Monaco editor read-only (can't type in function node)

i recently upgraded to 2.1.4 and enabled 'monaco' editor after the upgrade.

i wanted to try this in the previous version but it was read-only so i went back to ace.
Now i wanted to see if the read-only "bug" was fixed.

but version 2.1.4 did not work for me either.
i enabled monaco using

codeEditor: {
            lib: "monaco",
            options: {
                /** The follow options only apply if the editor is set to "monaco"
                 *
                 * theme - must match the file name of a theme in
                 * packages/node_modules/@node-red/editor-client/src/vendor/monaco/dist/theme
                 * 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
                 */
                //fontSize: 14,
                //fontFamily: "Cascadia Code, Fira Code, Consolas, 'Courier New', monospace",
                //fontLigatures: true,
            }
        }

in settings.js

After starting node-red and going in to a function node, nothing happens when i type.
So it is read-only behavior i checked the console and each time i press a key it shows this error:

editor.js:1 Uncaught Error: e[Symbol.iterator] is not a function
TypeError: e[Symbol.iterator] is not a function
    at Object.e.first (editor.js:1)
    at Object.getCommand (editor.js:5)
    at On.executeCommand (editor.js:5)
    at Object.paste (editor.js:5)
    at $e.paste (editor.js:5)
    at editor.js:5
    at c.fire (editor.js:1)
    at b._firePaste (editor.js:5)
    at HTMLTextAreaElement.<anonymous> (editor.js:5)
    at editor.js:1

node-red was upgraded with the script for raspberry pi
Please assist.
i have gone back to 'ace' for now since that works as expected.

You have a naughty node installed that pollutes a prototype.

See this for what and why.

Thank YOU!!
zigbee2mqtt was the sinner here.
I did not use it so i removed it and everything works :smiley:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.