Added cheatsheet popup to wiki editor.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
/*-----------------
|
||||
|
||||
|
||||
@@ -27,21 +27,29 @@
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
{% addtoblock 'js' %}
|
||||
{% comment %} These scripts load at the bottom of the body {% endcomment %}
|
||||
|
||||
|
||||
<script src="{% static 'js/bootstrap-alert.js' %}"></script>
|
||||
<script src="{% static 'js/bootstrap-collapse.js' %}"></script>
|
||||
<script src="{% static 'js/bootstrap-modal.js' %}"></script>
|
||||
|
||||
|
||||
{% 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 %}
|
||||
|
||||
|
||||
@@ -64,11 +72,14 @@
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% block wiki_contents %}{% endblock %}
|
||||
|
||||
|
||||
{% endblock %}
|
||||
</div>
|
||||
|
||||
{% include "wiki/includes/cheatsheet.html" %}
|
||||
|
||||
</section>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
53
lms/templates/wiki/includes/cheatsheet.html
Normal file
53
lms/templates/wiki/includes/cheatsheet.html
Normal file
@@ -0,0 +1,53 @@
|
||||
<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>
|
||||
Reference in New Issue
Block a user