Including Table of Content option in html toolbar in article body field of KA
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
7 hours ago
Hey Guys,
I am facing issue with table of contents html tinyMCE option, I have other html toolbar options and once I enable toc/tableofcontents option using attribute section of Article body dictionary, it is saving fine but on form it is removing existing toolbar options, like currently say there are 20 tools available so its removing around 10 approx.
Once I remove it from field attribute then options comes back.
Current Tool options:
editor.toolbar=accordion newdocument bold italic underline strikethrough bullist numlist alignleft aligncenter alignright alignjustify blocks fontfamily fontsize table link cut copy paste pastetext searchreplace image blockquote hr visualblocks subscript superscript charmap undo redo spellchecker codemirror lists advlist fullscreen directionality insertdatetime nonbreaking pagebreak outdent indent forecolor backcolor tableofcontents wordcount anchor code visualchars compat3x autolink align_listitems tinymcespellchecker
Not sure if I am doing anything wrong but would need help to fix this issue.
- Labels:
-
Incident Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
5 hours ago
Hi @suyoga ,
The issue is caused by a character limit in the TinyMCE toolbar. Adding tableofcontents can exceed this limit, causing some buttons to disappear.
Recommended Approach
Go to System Definition > Dictionary, open the text field on kb_knowledge.
In the Attributes section, modify editor.toolbar and split it into multiple rows using the pipe | symbol:
editor.toolbar=bold italic underline | bullist numlist | tableofcontents | link image codeSave and reload the article form to see all buttons.
Helpful Resources
ServiceNow Community: Table of Content in Knowledge Articles
ServiceNow Community: How to get the Table of Contents button back on TinyMCE
Thanks & Regards,
Muhammad Iftikhar
If my response helped, please mark it as the accepted solution so others can benefit as well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
Thanks a lot @M Iftikhar this helped.
However for me it seems character limit was not issue, I had to modify system property:
glide.ui.html.editor.enabled_plugins |
to have 'tableofcontents' in value section appended and also in the attribute toolbar.editor it fixed the issue.