I am facing an issue with UI template where monaco editor does not format the code properly leading to linting problems and broke my code. this is happening in version 3.3.1
I originally thought it is a global issue but I confirmed that other nodes such as Function node does not have this problem.
I sometimes have to go through long lines to fix the code.
The unformatted code has no rules, so for example you can see long lines, same line having multiple function declarations, etc.
When i copy the code from my editor to UI Template , it jungles the code and I have to go fix it line by line...
Anyone have seen similar issue ? is it something to do with some config I am missing ?
node-red-dashboard v 3.3.1
Node-RED version 3.0.2
Node.js version: v16.17.1
A workaround would be to disable auto-formating on paste formatOnPaste: false, ?
(In your editorTheme codeEditor options section in settings.js)
/** Select the text editor component used by the editor.
* As of Node-RED V3, this defaults to "monaco", but can be set to "ace" if desired
/** The follow options only apply if the editor is set to "monaco"
* theme - must match the file name of a theme in
* e.g. "tomorrow-night", "upstream-sunburst", "github", "my-theme"
// theme: "vs",
/** other overrides can be set e.g. fontSize, fontFamily, fontLigatures etc.
* for the full list, see https://microsoft.github.io/monaco-editor/api/interfaces/monaco.editor.IStandaloneEditorConstructionOptions.html
//fontFamily: "Cascadia Code, Fira Code, Consolas, 'Courier New', monospace",
thank you!! indeed it is.. yes I realised the trick of just undo but the real issue is that making modifications in the code becomes really a pain.. copy and paste from editor every change etc.
Anyway, gotta live with it I suppose until monaco is fixed!!