We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

TinyMCE - How to configure the Table Of Content option to use H1 to H9

Johan van den H
Kilo Sage

We are using TinyMCE (without any customization) and have enabled the TOC icon so knowledge creators can make a Table Of Contents based on the headers used in their knowledge article.

However, we are limited to use only heading 3 as heading 1 and 2 are way too big to use.

From the TinyMCE documentation online:
tableofcontents_depth
By default headers in the content will be inspected only three levels deep, so - H1 through H3. But it is possible to change this behavior by setting tableofcontents_depth to any number in 1-9 range, therefore matching all the headers beginning with H1 and all the way down to H9.
Type: Number
Default value: 3

Can this tableofcontents_depth setting be changed in the TinyMCE editor in ServiceNow?

1 REPLY 1

Johan van den H
Kilo Sage

I also send this question to ServiceNow support and they answered:

As you have confirmed in the description of this case, the contents can only be generated from Heading 1 to Heading 3:
https://docs.servicenow.com/bundle/washingtondc-servicenow-platform/page/product/knowledge-managemen...

I have further reviewed the possibility of modifying this to cater for different headers.

Currently, this is not configurable within the platform.

Given this is working as intended, and given there is no other alternative OOB method to configure this, you may wish to raise an idea request to propose this to our development team.

 

I will raise this as an idea.