1
0
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:
Stephen McLaughlin 2022-06-27 09:43:07 +01:00 committed by GitHub
commit cc5a0a436c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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();