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

Set default editor to monaco in absence of user preference

This commit is contained in:
Nick O'Leary 2022-06-22 21:43:25 +01:00
parent 1f5588b803
commit d2e84925f7
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
2 changed files with 9 additions and 9 deletions

View File

@ -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;

View File

@ -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();