|
|
@ -120,7 +120,7 @@
|
|
|
|
editor.toTextArea();
|
|
|
|
editor.toTextArea();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
editor = CodeMirror.fromTextArea(refs.editor, {
|
|
|
|
const opts = {
|
|
|
|
lineNumbers,
|
|
|
|
lineNumbers,
|
|
|
|
lineWrapping: true,
|
|
|
|
lineWrapping: true,
|
|
|
|
indentWithTabs: true,
|
|
|
|
indentWithTabs: true,
|
|
|
@ -130,12 +130,15 @@
|
|
|
|
mode: modes[mode] || {
|
|
|
|
mode: modes[mode] || {
|
|
|
|
name: mode
|
|
|
|
name: mode
|
|
|
|
},
|
|
|
|
},
|
|
|
|
readOnly: readonly,
|
|
|
|
readOnly: readonly
|
|
|
|
extraKeys: {
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!tab) opts.extraKeys = {
|
|
|
|
Tab: tab,
|
|
|
|
Tab: tab,
|
|
|
|
'Shift-Tab': tab
|
|
|
|
'Shift-Tab': tab
|
|
|
|
}
|
|
|
|
};
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
editor = CodeMirror.fromTextArea(refs.editor, opts);
|
|
|
|
|
|
|
|
|
|
|
|
editor.on('change', instance => {
|
|
|
|
editor.on('change', instance => {
|
|
|
|
if (!updating) {
|
|
|
|
if (!updating) {
|
|
|
|