How to remove/hide "Bold" option and styling from HTML fields in form?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
I am looking for the best practice / recommended approach to restrict or remove the "Bold" text option and bold styling from HTML fields on a form.
Specifically, I want to address two main requirements:
1. Toolbar Restriction: Prevent users from applying bold formatting by removing/hiding the Bold button (and shortcut) from the TinyMCE toolbar on a specific HTML field (or globally if needed).
2. Style / Content Sanitization: Prevent existing `<b>` or `<strong>` tags (or inline font-weight: bold styles) from rendering or saving as bold text inside the field.
- What is the most seamless way to restrict the toolbar button for a specific field without breaking TinyMCE?
- Is there a built-in ServiceNow configuration or HTML Sanitizer setting to strip/ignore bold tags automatically?
Any examples or best practices would be greatly appreciated!
Thanks in advance for your help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
You can try with Updating System properties "glide.ui.html.editor.toolbar" as per below mentioned servicenow Documentation .
Refer: Configur ing the TinyMCE toolbar via Dictionary attributes
https://www.servicenow.com/docs/r/platform-administration/tinymce.html
Procedure
- Navigate to All > System Properties > UI Properties.
- Update the Configures the editing toolbar for HTML fields(TinyMCE v6.8.2) (glide.ui.html.editor.toolbar) property to add or remove buttons for the toolbar.Note:Type ButtonsUse a vertical bar ("|") to add a section separator.
Default buttons bold italic underline undo redo | fontfamily fontsize table | forecolor backcolor link unlink | image media code | alignleft aligncenter alignright | bullist numlist fullscreen Available buttons newdocument, bold, italic, underline, strikethrough, justifyleft, justifycenter, justifyright, justifyfull, blocks, fontfamily, fontsize, tablecontrols, cut, copy, paste, pastetext, pasteword, search, replace, bullist, numlist, outdent, indent, blockquote, undo, redo, link, unlink, image, cleanup, code, forecolor, backcolor, removeformat, hr, visualaid, sub, sup, charmap, media, preview, fullscreen, accordion - Select Save.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
57m ago
on the field dictionary add this attribute and it will disable everything
editor.toolbar=false
Output
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader