Seit Node Red V2.0 gibt es die Möglichkeit den „Monaco“-Codeeditor zu verwenden (auch für Home Assistant). Dadurch erhält man unter anderem eine Autovervollständigung was sehr hilfreich bei functions-nodes ist.
Fügt zum aktivieren des Editors einfach die folgenden Zeilen in die Datei …/node-red/settings.js ein.
configuration.yaml
1codeEditor: {
2 // Select the text editor component used by the editor.
3 // Defaults to "ace", but can be set to "ace" or "monaco"
4 lib: "monaco",
5 options: {
6 // The follow options only apply if the editor is set to "monaco"
7 // theme - must match the file name of a theme in
8 //packages/node_modules/@node-red/editor-client/src/vendor/monaco/dist/theme
9 // e.g. "tomorrow-night", "upstream-sunburst", "github", "my-theme"
10 theme: "tomorrow-night",
11 // other overrides can be set e.g. fontSize, fontFamily, fontLigatures etc.
12 // for the full list, see https://microsoft.github.io/monaco-editor/api/interfaces/monaco.editor.istandaloneeditorconstructionoptions.html
13 //fontSize: 14,
14 //fontFamily: "Cascadia Code, Fira Code, Consolas, 'Courier New', monospace",
15 //fontLigatures: true,
16 },
17 },
Das ganze sollte dann in etwa so aussehen:




