Work Notes Syntax Highlighting
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-11-2016 07:10 AM
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!
- Labels:
-
User Interface (UI)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-11-2016 07:12 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-02-2023 07:44 AM
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]

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-11-2016 07:33 AM
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..

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-11-2016 07:33 AM
I was typing and chuck was the fastest..