mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Merge pull request #3702 from node-red/default-monaco
Set default editor to monaco in absence of user preference
This commit is contained in:
commit
cc5a0a436c
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
const MONACO = "monaco";
|
const MONACO = "monaco";
|
||||||
const ACE = "ace";
|
const ACE = "ace";
|
||||||
const defaultEditor = ACE;
|
const defaultEditor = MONACO;
|
||||||
const DEFAULT_SETTINGS = { lib: defaultEditor, options: {} };
|
const DEFAULT_SETTINGS = { lib: defaultEditor, options: {} };
|
||||||
var selectedCodeEditor = null;
|
var selectedCodeEditor = null;
|
||||||
var initialised = false;
|
var initialised = false;
|
||||||
|
@ -91,7 +91,7 @@ var api = module.exports = {
|
|||||||
safeSettings.context = runtime.nodes.listContextStores();
|
safeSettings.context = runtime.nodes.listContextStores();
|
||||||
if (runtime.settings.editorTheme && runtime.settings.editorTheme.codeEditor) {
|
if (runtime.settings.editorTheme && runtime.settings.editorTheme.codeEditor) {
|
||||||
safeSettings.codeEditor = runtime.settings.editorTheme.codeEditor || {};
|
safeSettings.codeEditor = runtime.settings.editorTheme.codeEditor || {};
|
||||||
safeSettings.codeEditor.lib = safeSettings.codeEditor.lib || "ace";
|
safeSettings.codeEditor.lib = safeSettings.codeEditor.lib || "monaco";
|
||||||
safeSettings.codeEditor.options = safeSettings.codeEditor.options || {};
|
safeSettings.codeEditor.options = safeSettings.codeEditor.options || {};
|
||||||
}
|
}
|
||||||
safeSettings.libraries = runtime.library.getLibraries();
|
safeSettings.libraries = runtime.library.getLibraries();
|
||||||
|
Loading…
Reference in New Issue
Block a user