Editor Text Size

I searched to see if this was addressed yet however I did not find any relative content (which kinda surprised me)..

When I size my browser screen such that the tabs and flows (and most importantly, the Dashboard) are convenient to read, use and work on, I find that the text (code) within the NR editor is quite small for my aging eyes. Simply, is there a way to increase the text size of the NR editor?

I use cmd-shift-+ (on Mac) to increase the page font (and everything) size.
If you are using the Monaco editor for functions then you can set fontSize: 14, etc in your setttings.js file if you just need that font resized.

Thanks dceejay. I use Chrome as the browser on a separate pc (LAN) and I desire the page size (everything really) to remain as is, just have the native NR editor text size increase for coding Does it matter where or how, in settings.js, I put the option? Don't wish to mess up the file syntax.

If you have a recent install you settings.js should have a section at the bottom like

        ,
        codeEditor: {
            /** Select the text editor component used by the editor.
             * Defaults to "ace", but can be set to "ace" or "monaco"
             */
            lib: "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",
                /** 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.ht>
                 */
                //fontSize: 14,
                //fontFamily: "Cascadia Code, Fira Code, Consolas, 'Courier New', monospace",
                //fontLigatures: true,
            }
        }

just make sure you switch ace to monaco to enable that editor then edit (remove //) from the fontSize option

Ok. Thanks again. Clearly my settings.js file has not been updated for a while. I've gone to the resource page default settings.js to review the current version and update my file accordingly. I do update NR regularly so I'm going to guess that if it sees custom options it does not replace the file, which is as it should be.

1 Like

Correct, the upgrade process doesn’t touch any existing settings file, so yes any new parts won’t get added. (But should default to sensible (existing) behaviour. )

I was not aware the settings.js file doesn't get updated. What if I maybe interested on some new additions like the one mentioned above? Is there a place where I can look at the settings.js default file?
Thk.

Theres always the source - node-red/settings.js at master · node-red/node-red · GitHub

FYI ebolisa I had put a direct link in an earlier post.

BTW dceejay, I did not know about the monaco editor and like it much better than ace. Thanks for the tip.

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