Built something you're proud of? Tell the story. A quick G2 review of App Engine or Build Agent helps other developers see what's possible on ServiceNow. Share your experience.

why my javascript syntax editor is showning colours wrongly

Not applicable

Samara_Redde_0-1706337866457.png

for reserved words like function, var,if else -- text shown in purple right, for me its showing blue.
for g_form or g_user  text should shown in blue colour, but for me it is showing in black
can i get any help to fix the issue, i have requested new instance also, it also the same
it is difficult to code, pls help

 

 

1 ACCEPTED SOLUTION

Sainath N
Mega Sage

@Community Alums : You may have to look - ServiceNow Monaco Editor.

 

https://www.servicenow.com/community/developer-articles/some-tips-and-tricks-for-the-new-monaco-code...

 

https://cezarybasta.dev/refresh-your-developer-experience/

 

Please mark this as correct answer and helpful if it resolved, or mark this helpful if this help you to reach towards solution.

View solution in original post

2 REPLIES 2

Sainath N
Mega Sage

@Community Alums : You may have to look - ServiceNow Monaco Editor.

 

https://www.servicenow.com/community/developer-articles/some-tips-and-tricks-for-the-new-monaco-code...

 

https://cezarybasta.dev/refresh-your-developer-experience/

 

Please mark this as correct answer and helpful if it resolved, or mark this helpful if this help you to reach towards solution.

chetanb
Tera Guru

Hello @Community Alums ,

 

With the Utah release, TinyMCE-based editor with the Microsoft’s Monaco editor for all script fields. There are many new features coming with this release.

 

You may check here -https://www.servicenow.com/community/developer-articles/some-tips-and-tricks-for-the-new-monaco-code...

https://docs.servicenow.com/bundle/vancouver-api-reference/page/script/general-scripting/concept/mon...

 

There are certain things around the editor -

The code editor is Monaco when editing scripts in the platform and if you use servicenow studio then the editor is still the old one(codemirror).

When type g_form nothing pop up except getValue()

Its showing event as deprecated but it still works

 

Please mark this as correct answer and helpful if it resolved, or mark this helpful if this help you to reach towards solution.

 

Regards,

CB