Commit d94ef545 by Carlos Andrés Rocha

Added cheatsheet popup to wiki editor.

parent d05b3de0
......@@ -567,11 +567,30 @@ section.wiki {
background: #f00 !important;
}
#cheatsheetLink {
text-align:right;
display: float;
}
#cheatsheetModal {
width: 350px;
margin-left: 100px;
margin-top: -100px;
}
#cheatsheet-body {
background: #FFF;
text-align: left;
padding: 10px;
}
#cheatsheet-body pre{
color: #000;
text-align: left;
background: #EEE;
margin:10px;
padding: 10px;
}
/*-----------------
......
......@@ -39,7 +39,15 @@
{% with mathjax_mode='wiki' %}
{% include "mathjax_include.html" %}
{% endwith %}
<script type="text/javascript">
$(document).ready(function () {
editor = $('#div_id_content div.controls');
cs = editor.prepend('<a id="cheatsheetLink" href="#">cheatsheet</a>');
cs.click(function() {
$('#cheatsheetModal').modal('show');
});
});
</script>
{% endaddtoblock %}
{% endblock %}
......@@ -69,6 +77,9 @@
{% endblock %}
</div>
{% include "wiki/includes/cheatsheet.html" %}
</section>
{% endblock %}
<section id="cheatsheetModal" class="modal hide fade" >
<div id="cheatsheet-body" class="modal-body">
<h2>Wiki Syntax Help</h2>
<p> This wiki uses <strong>Markdown</strong> for styling.
There are several <a href="http://daringfireball.net/projects/markdown/basics" target="_blank">useful</a>
<a href="http://greg.vario.us/doc/markdown.txt" target="_blank">guides</a>
<a href="http://www.lowendtalk.com/discussion/6/miniature-markdown-guide" target="_blank">online</a>.
<p> To create a new wiki article, create a link to it. Clicking the link gives you the creation page.
<pre>
[Article Name](wiki:ArticleName)
</pre>
<h2> Useful examples:</h2>
<pre>
http://wikipedia.org
[Wikipedia](http://wikipedia.org)
[edX Wiki](wiki:/edx/)
</pre>
<pre>
Huge Header
===========
</pre>
<pre>
Smaller Header
--------------
</pre>
<pre>
*emphasis* or _emphasis_
</pre>
<pre>
**strong** or __strong__
</pre>
<pre>
- Unordered List
- Sub Item 1
- Sub Item 2
</pre>
<pre>
1. Ordered
2. List
</pre>
<pre>
> Quotes
</pre>
<h2>edX Additions:</h2>
<pre>
circuit-schematic:
</pre>
<pre>
$LaTeX Math Expression$
</pre>
</div>
</div>
</section>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment