mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Merge pull request #3791 from Steve-Mcl/allow-editor-create-no-title-no-mode
Allow `mode` and `title` to be omitted in `options` argument for `createEditor`
This commit is contained in:
commit
bfdbeb0964
@ -764,7 +764,7 @@ RED.editor.codeEditor.monaco = (function() {
|
||||
|
||||
|
||||
if(!options.stateId && options.stateId !== false) {
|
||||
options.stateId = RED.editor.generateViewStateId("monaco", options, (options.mode || options.title).split("/").pop());
|
||||
options.stateId = RED.editor.generateViewStateId("monaco", options, (options.mode || options.title || "").split("/").pop());
|
||||
}
|
||||
var el = options.element || $("#"+options.id)[0];
|
||||
var toolbarRow = $("<div>").appendTo(el);
|
||||
|
Loading…
Reference in New Issue
Block a user