function node opens with only single tap instead of long press & edit from the pop-up menu, so moving/deleting the node cannot be done
first test using Swift Keyboard somehow froze the text input after selecting a completion, no issues with a second test using Hacker's Keyboard (= no predictive input)
This work was done atop the dev branch which is undergoing a lot of change at the moment (i've noticed) - some things are not quite ready it seems.
I didnt change anything at all in any of the nodes (that was deliberate as the modification had to be transparent to the core + contrib nodes) - so my guess - its a dev thing.
That is a concern - how does the ACE editor handle Swift keyboard?
Would you be willing to try the GBoard keyboard from google? (I find it to be excellent & it is default on a lot of andriod devices - would be a great test).
Ah didn't realise that. Yes it seems the edit dialog now opens on initial tap. Dragging and menu still work with a long press but it seems to require doing it in a specific way.
My device is too full to install new apps at the moment but I tested with Samsung keyboard with predictions enabled. I wasn't able to reproduce the issue with a quick test at least. I also retested Swift Keyboard and it indeed doesn't work too well but I remember it having occasional issues with ACE also so I wouldn't worry about that too much.
Aside - I would say the minimap preview takes too much space an a small by default edit window, what do you think? Also I think there's a space in the margin for debug markers to the left of line numbers so it looks unnecessarily wide. Small details but worth mentioning still.
I an busy adding the ability to have custom options in the settings.js that will map directly to the monaco.editor.ieditoroptions meaning you can adjust minimap size, switch off things like folding, line numbers etc
Very cool! Any chance of a custom color theme setting? I don't know about the compatibility but since I've created one for VSCode it'd be great. I've themed the ACE editor already to match my NR theme.
OK - it wasnt as easy as it should be but here goes...
Demo...
To add a theme - place the json file in packages/node_modules/@node-red\editor-client/src/vendor/monaco/min/vs/theme then npm build so they get added to the package.
To set the theme - I have adjusted the settings.editor arrangement slightly so that you can take advantage of the numerous options in monaco.editor.ieditoroptions (in the example below I shrink the minimap and set font to 10
Now finally testing on my laptop. Themes work great! The file format is unfortunately not the same as for VSCode themes. Not that reimplementing my custom theme on this format would be that big of a deal. Excellent that you also exposed a bunch of other settings as well.
I'll definitely play more with this after my ongoing project of migrating my Node-RED flows from an Odroid C2 into two SSD booted Raspberry Pi 4's. My plan is to split home and summer cottage flows, so all the summer cottage stuff could run locally and not rely on a VPN connection to my home. Amazingly this setup has run with only minor issues over two years now. But my luck cannot last forever.
Guys, I didn't find this thread in any google search, so I just went ahead and integrated the Monaco editor on my own, but has a few minor issues still:
It's a rough draft. I just started playing with node red yesterday and built it the same day, so it still needs work.
I mainly edited the function node and the editor template file. It supports JS, but when TS exists, the JS is read-only. It does not yet have any code completion for msg and other objects yet, as this was only a POC, but the one in this post seems much better, and seems more integrated properly, so I'll probably stop.
I did it to prove Monaco can seamlessly replace ace. Which i did.
I created the necessary proxies & stubs so that not only node-red but all contrib nodes also worked transparently and without modification - which would be the major hurdle in adoption.
Lastly, Monaco doesn't work 100% on IE11 (ms dropped its own browser - I wish corporate would too) and is not fully mobile/tablet ready (yet)
Ps. Your search skills need honing - guess what the first search result for "node-red Monaco" points to
My approach was to keep ACE and just have Monaco feed into it (and a switch to go back and forth). So far the idea shows it can work great, but until this thread, I didn't know how everything really fit together.
Are there any issues still not resolved for your implementation? You are much farther with this, so I may just help yours along instead.
There's TypeScript support in ACE also (although very basic). I think the biggest obstacle there would be to make function nodes support it. I wonder if ts-node could somehow facilitate that? But it goes off topic.