New CRMScript editor (again): Monaco
Hi all,
We have been testing whether it is possible to replace Codemirror as our CRMScript editor with Monaco (the basis of VSCode). We have currently implemented this as a testable feature in our latest build, hoping that some of you will try it out and tell us what is not working :-)
You can enable Monaco as your CRMScript editor by using the "rms.fcgi?action=debug" panel and tick the Monaco-checkbox. The setting is stored as a cookie in your browser and will only affect you in that particular browser, other users will not be affected. This setting is available in build "main_10.3.7_2024.05.23-01".
Sverre
All Replies (45)
Haven't got this build on SOD yet, but just curious, any particular reason why you are replacing the editor (again)? (better javascript/typescript support for the future? something else?)
I haven't got this build yet either, but this is exciting! I can't wait to try it out.
If you guys have some SOD tennant ID's, I can upgrade them.
Sverre
Hi all,
I have upgraded the abovementioned sites to main_10.3.7_2024.05.24-01 and also changed them from being on Release to being on Main (otherwise they would have gotten upgraded back to Release tonight). Be aware that these sites will now be upgraded more frequently to our latest code. Let us know if you need them back on the Release-branch. This can probably not be done immediately, but next week when we merge from main to release.
Sverre
Hi Sverre,
I got the new editor now, first impressions are good (related to intellissense, formatting, etc).
Did notice that it is trying to load a ts.worker.js file from the wrong url:
'https://sod.superoffice.com/superoffice/cs/javascript/monaco/ts.worker.js' instead of 'https://sod2.superoffice.com/Cust11255/cs/javascript/monaco/ts.worker.js'
Thank you Sverre! I tested it out for about five minutes and I like it so far.
Things I like:
- Intellisense description dialog box is easy to read and well formatted.
- Things like struct properties are immediately visible in Intellisense without having to click Save first. Yay!
Things to look at:
- When hitting enter at the end of a line, it inserts four spaces. I expect it not to insert any spaces or tabs, I can do that myself if needed. 🙂
- When getting multiple syntax errors after clicking save, they sometimes lie on top of each other, making it cluttered:
- After first getting one syntax error (likes the ones above), it doesn't help fixing the error and then clicking save. The error tooltips still show up until I click OK.
To the good people in this thread:
https://community.superoffice.com/en/technical/forums/api-forums/service-crmscript/from-javascript-to-typescript/
//Eivind
This is live in the 10.3.8 release now, so you can test it on SOD/production test tenants that have been upgraded to that version.
It looks like this is not a feature anymore and that its been activated as standard in a tenant we have.
Is there a way to get the old editor back ?
I dont like the fact that we cannot use ctrl+shift to auto indent the code.
The indentation also looks wierd if I just use line shift after defining variables which should have same indentation.
Whats up with the color changing of commented bulk of code in the new editor.
There are several examples
This is one. Here it looks like the last right paranthesis is part of a comment by the color of it.
When it in reality is not. Taking the code to notepad++
It is quite frustrating with these kind of "false" problems, specially in files with alot of code.
Hi,
It looks like you have a block comment start in front of function secondFunction, but no end?
Hi,
The command pallet says the following shortcuts should work for commenting out multiple lines should work, however non of them actually do.
Also, having text selected and selecting one of the commands does not do anything either.
I'm using Firefox.
Jari
Just tried in on SOD, release SuperOffice CRM Online 10.3 Build main_10.3.9_2024.08.30-01. There the commands with a shortcut assigned do work, both with and without selection.
Still a few issues that still exists since switching to the new editors.
- Hold Alt and mousekey down and drag over multiple rows and write anything.
Expected: If you highlighted rows and for example wrote // it would comment out the affected rows. - Might not be because of the new editor (think it came before that), but not being able to copy text from a script unless you edit it is anoying as hell.
Regards
Pär
When adding a comment via // and press enter afterwards, the next line will have an indent which I think should be removed
I would expect:
The intellisense suggestions seem a bit too enthusiastic..
If for example I type in the else keyword, i get these suggestions:
So pressing enter after else will auto complete to 'executeSQLQuery'...
Tested on SuperOffice CRM Online 10.3 Build main_10.3.9_2024.09.10-01