🎉 Node-RED 2.0.0-beta.1 Released

Hello
Monaco, can not input any text

running 2.0.0.beta1
browser
Safari
Chrome Mac
Chrome Windows

I can open a already written function, cannot write, be it in a function or any other text input.

in the function node, on the upper left corner, a shadow appears but and some "noise".

see my config file

    // Customising the editor
editorTheme: {
    codeEditor: {
        lib: "monaco"
    }
 },
codeEditor: {
            /** Select the text editor component used by the editor.
             * Defaults to "ace", but can be set to "ace" or "monaco"
             */
            lib: 'monaco', // 'ace',
            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-dark', // '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",
                fontFamily: "Consolas, 'Courier New', monospace",
                fontLigatures: false,
                colorDecorators: true,
                dragAndDrop: true,
                linkedEditing: true,
                minimap: {
                    enabled: false,
                },
                mouseWheelZoom: true,
                showFoldingControls: 'always',
                useTabStops: true,
            },
        },

}

Your config doesn't quite look right.
Compare it with mine...

 // Customising the editor
    editorTheme: {
        codeEditor: {
                lib: "monaco",
                options: {
                        theme: "vs-dark",
                        fontSize: 14,
                        fontFamily: "Consolas, 'Courier New', monospace",
                        fontLigatures: false,
                        colorDecorators: true,
                        dragAndDrop: true,
                        linkedEditing: true,
                        minimap: {
                                enabled: false,
                                },
                        mouseWheelZoom: true,
                        showFoldingControls: 'always',
                        useTabStops: true
                        }
                }
	  },

See the revised settings.js file where the required layout is detailed.

@JoseGodinho - I see that you have just re-edited your post above and made a number of changes to that post...
Why?

I just posted one time ....

If you look at the edit history of the post, Steve edited to fix the code formatting. No material changes were made.

Hhmm strange.
The post has been changed again from when I last saw it at 8.39pm!!
When I checked it earlier, the post had been edited to show the correct syntax....
@Steve-Mcl did you make 2 changes to the post within a short timeframe? (discourse does not record every change in the history within a certain time frame).

@JoseGodinho - Apologies, is your problem now resolved?

@Paul-Reed - no hard feelings.

Back to the issue at hand.
I updated node red as per this thread, but the settings.js file did not appear complete, so I to copy some of the config file from this thread as well.

Now I just copy the settings from github and I am trying to get monaco to work.

1 Like

Yes, I am going to do the same. :+1:

Hello
something is strange the lines below, are not the link shared ..
colorDecorators: true,

*                        dragAndDrop: true,*
*                        linkedEditing: true,*
*                        minimap: {*
*                                enabled: false,*
*                                },*
*                        mouseWheelZoom: true,*
*                        showFoldingControls: 'always',*
*                        useTabStops: true*
*                        }*
*                }*

Sorry, what do you mean by 'link shared'?
The monaco options are lsted - IStandaloneEditorConstructionOptions | Monaco Editor API

This one

See the revised settings.js file where the required layout is detailed.

Not all of the options are shown in the settings.js comments, see IStandaloneEditorConstructionOptions | Monaco Editor API for the full list

Got it . I will rest my case until you boffins figure it out ...

The settings I put in my example all work fine.

1 Like

Hello

I have tried them .... don't work for me..

Do you mean you cannot type in the editor space?
Could you look in your browsers console for errors? (see this how-to)

Also, are you using any browser add-ins (like adblock or lastpass or uBlock etc)?


can you provide a screenshot of this?


Lets start simple

  1. change your settings.js config to just the minimum required
         codeEditor: {
             lib: "monaco",
             options: {
                 theme: "vs",
             }
         }
    
  2. Save & close settings.js
  3. Restart node-red
  4. clear browser cache (safari, chrome)
  5. load node-red editor & check

One other thing to try - an in-private browsing session which will have no cache and no browser extensions loaded.

Also check whether you have the node-red-contrib-zigbee2mqtt loaded as this caused me the same problem

Jeff, did you manage to resolve this by removing that node?

1- ( I tried in several browsers, windows ( Chrome) mac ( Safari,Chrome)
2- Flushed all historic,cookies, cache ....
3- navigated incognito
4- Screen Shots ..
4.1 Trying to type.

4.2 Opened an existing file

I will no try to remove zigebee2mqtt.