Tab now inserts two spaces, the path "coursewares/" is no longer broken
This commit is contained in:
@@ -21,6 +21,15 @@ var myCodeMirror = CodeMirror.fromTextArea(document.getElementById("codeEditor")
|
||||
var editor = myCodeMirror;
|
||||
editor.setSize("100%", "auto");
|
||||
|
||||
// Hijack tab key to enter two spaces intead
|
||||
editor.setOption("extraKeys", {
|
||||
Tab: function(cm) {
|
||||
var spaces = Array(cm.getOption("indentUnit") + 1).join(" ");
|
||||
cm.replaceSelection(spaces);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
var attempts = 0;
|
||||
if (attempts) {
|
||||
|
Reference in New Issue
Block a user