Fix #70
This commit is contained in:
parent
66d651eba6
commit
0f4a20e261
|
@ -445,7 +445,10 @@ var editors = {
|
||||||
var rulers = [];
|
var rulers = [];
|
||||||
rulers.push({color: "#ccc", column: 120, lineStyle: "dashed"});
|
rulers.push({color: "#ccc", column: 120, lineStyle: "dashed"});
|
||||||
|
|
||||||
var editor = CodeMirror.fromTextArea(document.getElementById("editor" + id), {
|
var textArea = document.getElementById("editor" + id);
|
||||||
|
textArea.value = data.content;
|
||||||
|
|
||||||
|
var editor = CodeMirror.fromTextArea(textArea, {
|
||||||
lineNumbers: true,
|
lineNumbers: true,
|
||||||
autofocus: true,
|
autofocus: true,
|
||||||
autoCloseBrackets: true,
|
autoCloseBrackets: true,
|
||||||
|
@ -505,7 +508,6 @@ var editors = {
|
||||||
});
|
});
|
||||||
|
|
||||||
editor.setSize('100%', $(".edit-panel").height() - $(".edit-panel .tabs").height());
|
editor.setSize('100%', $(".edit-panel").height() - $(".edit-panel .tabs").height());
|
||||||
editor.setValue(data.content);
|
|
||||||
editor.setOption("mode", data.mode);
|
editor.setOption("mode", data.mode);
|
||||||
editor.setOption("gutters", ["CodeMirror-lint-markers", "CodeMirror-foldgutter"]);
|
editor.setOption("gutters", ["CodeMirror-lint-markers", "CodeMirror-foldgutter"]);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue