Ensure ace edit history is reset after initialisation

This commit is contained in:
Nick O'Leary
2015-05-07 21:12:46 +01:00
parent cf25b2866e
commit ce5c9da107
4 changed files with 13 additions and 9 deletions

View File

@@ -115,9 +115,9 @@
this.editor = RED.editor.createEditor({
id: 'node-input-func-editor',
mode: 'ace/mode/javascript'
mode: 'ace/mode/javascript',
value: $("#node-input-func").val()
});
this.editor.setValue($("#node-input-func").val(),-1);
RED.library.create({
url:"functions", // where to get the data from

View File

@@ -98,9 +98,9 @@
});
this.editor = RED.editor.createEditor({
id: 'node-input-template-editor',
mode: 'ace/mode/html'
mode: 'ace/mode/html',
value: $("#node-input-template").val()
});
this.editor.setValue($("#node-input-template").val(),-1);
RED.library.create({
url:"functions", // where to get the data from
type:"function", // the type of object the library is for

View File

@@ -86,9 +86,9 @@
});
this.editor = RED.editor.createEditor({
id: 'node-input-info-editor',
mode: 'ace/mode/markdown'
mode: 'ace/mode/markdown',
value: $("#node-input-info").val()
});
this.editor.setValue($("#node-input-info").val(),-1);
this.editor.focus();
},
oneditsave: function() {