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

**URL:** <https://discourse.nodered.org/t/monaco-editor-read-only-cant-type-in-function-node/55245>\
**Category:** General\
**Created:** [15 December 2021 19:29 UTC](https://discourse.nodered.org/t/monaco-editor-read-only-cant-type-in-function-node/55245 "2021-12-15T19:29:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![svefro](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/svefro/32/4306_2.png) [@svefro](https://discourse.nodered.org/u/svefro)\
**Post date:** [15 December 2021 19:29 UTC](https://discourse.nodered.org/t/monaco-editor-read-only-cant-type-in-function-node/55245/1 "2021-12-15T19:29:05Z")

</div>

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

```auto
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:

```auto
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.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [15 December 2021 19:34 UTC](https://discourse.nodered.org/t/monaco-editor-read-only-cant-type-in-function-node/55245/2 "2021-12-15T19:34:58Z")

</div>

You have a naughty node installed that pollutes a prototype.

See [this](https://discourse.nodered.org/t/node-red-2-0-released/48647/43) for what and why.

---

<div class="post-metadata">

**Author:** ![svefro](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/svefro/32/4306_2.png) [@svefro](https://discourse.nodered.org/u/svefro)\
**Post date:** [15 December 2021 19:42 UTC](https://discourse.nodered.org/t/monaco-editor-read-only-cant-type-in-function-node/55245/3 "2021-12-15T19:42:36Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [29 December 2021 19:43 UTC](https://discourse.nodered.org/t/monaco-editor-read-only-cant-type-in-function-node/55245/4 "2021-12-29T19:43:31Z")

</div>

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