How to enable Code Block/Monospace formatting in CSM Workspace Additional Comments and Work Notes?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Hi everyone,
I'm investigating a requirement in CSM Configurable Workspace.
Currently, in the Activity Stream (Additional Comments and Work Notes), users can enter rich text, but there doesn't appear to be an option to format text as a Code Block or Monospace.
Our use case is that support engineers frequently share:
SQL queries
JSON/API responses
Log snippets
Stack traces
Without code block formatting, the content is difficult to read and copy accurately.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
Hi @Kajal Rai ,
Yes, this can be enabled using the supported journal-field rich text editor configuration.
Recommended configuration:
1. Navigate to:
sys_properties.list
2. Confirm the following property exists and is set to true:
Name:
glide.ui.journal.use_html
Type:
true/false
Value:
true
This enables the rich text editor for journal fields such as Additional Comments and Work Notes.
3. Configure the Code Sample plugin.
Open or create the following String property:
Name:
glide.ui.journal.html.plugins
Add the following value to the existing plugin list:
codesample
Important: Do not replace the existing plugins. Append codesample to the current value.
Example:
lists link autolink codesample
4. Configure the toolbar button.
Open or create the following String property:
Name:
glide.ui.journal.html.toolbar
Add the following value to the existing toolbar configuration:
codesample
Example:
bold italic underline | bullist numlist | link | codesample
Again, retain the existing toolbar options and only append codesample.
5. Save the properties, sign out, clear the browser cache or perform a hard refresh, and reopen CSM Configurable Workspace.
The Rich Text Editor should then display the Code Sample button. Agents can use it to insert SQL, JSON, API responses, scripts, logs, and stack traces in a code-style block with monospace formatting.
Important considerations:
- These journal properties are instance-wide and are not limited only to CSM Workspace.
- Test Additional Comments in the customer portal and outbound email notifications because Additional Comments may be customer-visible.
- Verify that code formatting is rendered correctly in the Activity Stream, portal, and notification email.
- Do not use DOM manipulation or clone the OOB Activity Stream component to add this button.
- Do not paste passwords, access tokens, API keys, personal information, or other sensitive data into comments or work notes.
- For very large logs, attach a TXT, LOG, JSON, or ZIP file instead of storing the complete content in a journal entry.
If the codesample button does not appear after configuring the properties, verify the ServiceNow family release, patch level, and CSM Configurable Workspace Store application version. Reproduce the behavior in an OOB workspace before opening a Now Support case.
Official references:
Configure the rich text editor for Activity Stream:
https://www.servicenow.com/docs/r/platform-user-interface/config-activity-stream-rte.html
Configure the HTML editor toolbar for journal fields:
https://www.servicenow.com/docs/r/platform-user-interface/configure-html-editor-toolbar.html
Configure TinyMCE plugins:
https://www.servicenow.com/docs/r/platform-administration/configuring-the-html-plugins-for-tinymce.h...
Hope this helps!
If this response helped, please mark it as Helpful.
If it resolves your issue, please Accept it as Solution.
Kind Regards,
Abhishek Pal