Fixes after codemirror update

This commit is contained in:
Silvan Calarco 2019-07-28 20:45:29 +02:00
parent 4f7942e57d
commit 621db0ff42
2 changed files with 6 additions and 6 deletions

View File

@ -256,7 +256,7 @@ div#container {
width:100%; width:100%;
} }
.CodeMirror { .CodeMirror {
font-size:9pt; font-size:10pt;
font-family:monospace; font-family:monospace;
line-height:1em; line-height:1em;
} }

View File

@ -96,13 +96,13 @@ function ajax_getvalues(request,confirm) {
var spectext = document.getElementById("spectext"); var spectext = document.getElementById("spectext");
if ((nodes[i].nodeName == "editor") && (spectext != undefined) && (spectext.parentNode != undefined)) if ((nodes[i].nodeName == "editor") && (spectext != undefined) && (spectext.parentNode != undefined))
{ {
editor = CodeMirror.fromTextArea(spectext, editor = CodeMirror.fromTextArea(spectext, {
{ lineNumbers: true, lineNumbers: false,
tabSize: 4, tabSize: 4,
indentUnit: 4, indentUnit: 4,
indentWithTabs: true, indentWithTabs: true
onChange: function() { editorChanged(); } });
}); editor.on('change', function() { editorChanged(); });
editor.setSize(null, 500); editor.setSize(null, 500);
} else if ((nodes[i].nodeName == "output") && (document.getElementById("outputbottom") != undefined)) { } else if ((nodes[i].nodeName == "output") && (document.getElementById("outputbottom") != undefined)) {
document.getElementById("outputbottom").scrollTop = document.getElementById("outputbottom").scrollHeight; document.getElementById("outputbottom").scrollTop = document.getElementById("outputbottom").scrollHeight;