Work Notes Syntax Highlighting

adaml
Mega Expert

Is it possible for Work Notes to contain Syntax Highlighting? For instance, users would like to add a work note to an Incident that might refer to some code. For instance the ">>" (Insert) button on this form allows me to add syntax markup like this:

This is my syntax highlighting

It's nice because it's visually separate from my other note

so people know exactly what i'm referring to in my other note details..

Is there any way to do something similar to this in an actual work note, or does anyone suggest anything similar?

Thanks!

7 REPLIES 7

Chuck Tomasi
Tera Patron

Hi Adam,



The only way I could see it being done would be to do some parsing of your own and implement it as an HTML field based on the work notes field content. Something along the lines of this.



Implementing HTML in Comments - ServiceNow Wiki



Again, you'd have to write a script that goes through and recognizes the right patterns then inserts the HTML around them. More tedious than difficult, really.


Another dead wiki link... ðŸ˜©
Fortunately I found what I was looking for in another community article. For everyone else looking for how to do this: 
Formatting within Journal fields using HTML & [code]

User145619
Giga Expert

You have to create a new field of type html and then pass the input of the worknotes to this and hide   the worknotes. in html you can render the way you need. html for rendering only..


I was typing and chuck was the fastest..