Tell ace about Function node globals

Closes #927
This commit is contained in:
Nick O'Leary
2016-07-28 17:14:55 +01:00
parent 1da8712a4a
commit f484156d8e
2 changed files with 23 additions and 1 deletions

View File

@@ -91,7 +91,21 @@
this.editor = RED.editor.createEditor({
id: 'node-input-func-editor',
mode: 'ace/mode/javascript',
value: $("#node-input-func").val()
value: $("#node-input-func").val(),
globals: {
msg:true,
context:true,
RED: true,
util: true,
flow: true,
global: true,
console: true,
Buffer: true,
setTimeout: true,
clearTimeout: true,
setInterval: true,
clearInterval: true
}
});
RED.library.create({