Fix: add editors hack

This commit is contained in:
eight 2017-09-12 03:44:19 +08:00
parent d4ddefe8a0
commit de84248e05

View File

@ -19,6 +19,8 @@ function createSourceEditor(style) {
// draw CodeMirror // draw CodeMirror
$('#sections textarea').value = style.source; $('#sections textarea').value = style.source;
const cm = CodeMirror.fromTextArea($('#sections textarea')); const cm = CodeMirror.fromTextArea($('#sections textarea'));
// too many functions depend on this global
editors.push(cm);
// dirty reporter // dirty reporter
const dirty = dirtyReporter(); const dirty = dirtyReporter();