intval3/app/www/static/js/intval.mscript.js

19 lines
407 B
JavaScript
Raw Permalink Normal View History

2017-11-23 00:48:45 +00:00
'use strict'
const editor = {}
editor.init = function () {
const elem = document.getElementById('mscript_editor');
editor.cm = CodeMirror.fromTextArea(elem, {
lineNumbers: true,
theme : 'monokai',
gutters: ['CodeMirror-linenumbers']
});
setTimeout(() => {
editor.cm.setValue('CF');
editor.cm.refresh();
}, 10);
};
document.addEventListener('DOMContentLoaded', event => {
editor.init();
});