When javascript syntax errors are generated in the blockly node (which shouldn't happen...):
Then I would like the editor to show those errors. But I'm not sure how to do that at the moment... @Steve-Mcl has working hard to integrate the Monaco editor in Node-RED, but now Node-RED supports both the Monaco and Ace editor. So how can I support both editors? Is it a common API perhaps?
I had a quick look at the function node (here), but I don't see where it is achieved...
And to get hold of the errors, I assume I can use getAnnotations (see here) for both editors?
There isn't really an API (there probably should be to simplify transplanting the code editor) but as ace was exposed to node creators from the start (and many node creators accessed ace functionally directly) there was little option but to emulate ace functionally.
Saying that, I did break parts of the code up for easier future editor replacements.
I'm back at home ...j
The getAnnotations already works file.
But when I copy the javascript code from the blockly node (see screenshot above) to a function node, then the errors are underlined and I get information about it in a popup:
It is not clear to me why I don't get those error indicators in the blockly node editor.
Could that be because our editor is readonly perhaps?