Closed Steve-Mcl closed 3 years ago
Hey Steve, Thanks for your detailed analysis! Only the timing is a bit bad... I have neglected this node for 3 years, and the master branch is not production ready anymore... But we are finalizing a major 2.0.0 beta release. Is it ok if we fix it in that beta, which will be released soon? Because the Node-RED 2.0.0 is also a beta... Bart
Of course Bart. Thanks.
The fix is implemented for both the Javascript and XML editors in the "release-1.1.0" branch. The Monaco xml editor in Node-RED 2.0 beta 1 looks much better:
Thanks for the quick intervention Steve!
Hi Bart, your blockly node calls direct operations on ace editor & as there is no error handling, form initialisation is not completed - braking the UI of your node when monaco is the chosen editor.
This code calls
textInput.setReadOnly
...node.aceEditor.textInput.setReadOnly(true);
is not supported.I will see if Nick will permit the addition of
editor.setReadOnly
(as the ACE API defines) but not thetextInput
object (I have no idea even what that is?)NOTE: The normal initialisation of the node-red code editor is done by setting the
readOnly
option when initialising the editor & for serverside functionality, useace/mode/nrjavascript
(no need for all the globals)E.g., replace all the above code with just this...
I have tested this ↑ modification and it fixes blockly for NR2...
Would you be kind enough to update and re-publish?
PS I have not tested this in ACE mode yet, but it should work fine.