Commit e095a139 by Don Mitchell

Cheat sheet updated for header and explanation. Video removed.

parent 495814c0
......@@ -30,6 +30,17 @@
<article class="simple-editor-cheatsheet">
<div class="cheatsheet-wrapper">
<div class="row">
<h6>Header</h6>
<div class="col sample">
<img src="/static/img/header-example.png" />
</div>
<div class="col">
<pre><code>H1
=====
</pre>
</div>
</div>
<div class="row">
<h6>Multiple Choice</h6>
<div class="col sample">
<img src="/static/img/choice-example.png" />
......@@ -78,6 +89,18 @@
<pre><code>[[wrong, (right)]]</code></pre>
</div>
</div>
<div class="row">
<h6>Explanation</h6>
<div class="col sample">
<img src="/static/img/explanation-example.png" />
</div>
<div class="col">
<pre><code>[explanation]
A short explanation of the answer.
[explanation]
</code></pre>
</div>
</div>
</div>
</article>
</script>
......@@ -257,8 +257,6 @@ describe 'MarkdownEditingDescriptor', ->
[(] distractor
[] no space
{{video abcd1s}}
Option with multiple correct ones
[[one option, (correct one), (should not be correct)]]
......@@ -312,8 +310,6 @@ describe 'MarkdownEditingDescriptor', ->
</choicegroup>
</multiplechoiceresponse>
<video youtube="1.0:abcd1s" />
<p>Option with multiple correct ones</p>
<optionresponse>
......
......@@ -165,7 +165,7 @@ class @MarkdownEditingDescriptor extends XModule.Descriptor
else
return template
# We may wish to add insertHeader and insertVideo. Here is Tom's code.
# We may wish to add insertHeader. Here is Tom's code.
# function makeHeader() {
# var selection = simpleEditor.getSelection();
# var revisedSelection = selection + '\n';
......@@ -175,11 +175,6 @@ class @MarkdownEditingDescriptor extends XModule.Descriptor
# simpleEditor.replaceSelection(revisedSelection);
#}
#
#function makeVideo() {
#var selection = simpleEditor.getSelection();
#simpleEditor.replaceSelection('{{video ' + selection + '}}');
#}
#
@markdownToXml: (markdown)->
toXml = `function(markdown) {
var xml = markdown;
......@@ -222,9 +217,6 @@ class @MarkdownEditingDescriptor extends XModule.Descriptor
return groupString;
});
// replace videos
xml = xml.replace(/\{\{video\s(.*?)\}\}/g, '<video youtube="1.0:$1" />\n\n');
// replace string and numerical
xml = xml.replace(/^\=\s*(.*?$)/gm, function(match, p) {
var string;
......
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