1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Add setReadOnly support

This commit is contained in:
Steve-Mcl 2021-06-10 21:18:29 +01:00
parent 4acb66fb7a
commit 12253e23b5

View File

@ -990,6 +990,10 @@ RED.editor.codeEditor.monaco = (function() {
_executeEdits(this,[op]);
}
ed.setReadOnly = function setReadOnly(readOnly) {
ed.updateOptions({ readOnly: readOnly })
}
ed.session.replace = function replace(range, text) {
var op = { range: range, text: text, forceMoveMarkers: true };
_executeEdits(this,[op]);