mitx_markdown => edx_markdown

This commit is contained in:
David Baumgold
2013-12-02 12:20:48 -05:00
parent d1f3e3a6b5
commit 6af8ecef03
3 changed files with 39 additions and 39 deletions

View File

@@ -57,7 +57,7 @@ class CodeMirror(BaseEditor):
}
js = ("js/vendor/CodeMirror/codemirror.js",
"js/vendor/CodeMirror/xml.js",
"js/vendor/CodeMirror/mitx_markdown.js",
"js/vendor/CodeMirror/edx_markdown.js",
"js/wiki/accessible.js",
"js/wiki/CodeMirror.init.js",
)

View File

@@ -1,24 +1,24 @@
$(document).ready(function() {
var editor = CodeMirror.fromTextArea(document.getElementById("id_content"), {
mode: 'mitx_markdown',
mode: 'edx_markdown',
matchBrackets: true,
theme: "default",
lineWrapping: true,
keyMap: "accessible"
});
//Store the inital contents so we can compare for unsaved changes
var initial_contents = editor.getValue();
window.onbeforeunload = function askConfirm() { //Warn the user before they navigate away
if ( editor.getValue() != initial_contents ) {
return "You have made changes to the article that have not been saved yet.";
}
};
$(".btn-primary").click(function() {
initial_contents = editor.getValue();
});
});
});