<h2>Insert a table of contents in knowledge articles</h2><br/><div style="overflow-x:auto"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head><meta content="text/html; charset=UTF-8" /><meta name="copyright" content="(C) Copyright 2025" /><meta name="DC.rights.owner" content="(C) Copyright 2025" /><meta name="generator" content="DITA-OT" /><meta name="DC.type" content="task" /><meta name="DC.title" content="Insert a table of contents in knowledge articles" /><meta name="abstract" content="Insert a hierarchical table of contents (toc) based on the headings in your knowledge article." /><meta name="description" content="Insert a hierarchical table of contents (toc) based on the headings in your knowledge article." /><meta name="DC.creator" content="ServiceNow" /><meta name="DC.date.created" content="2023-08-03" /><meta name="DC.date.modified" content="2024-02-01" /><meta name="DC.date.modified" content="2024-02-01" /><meta name="DC.format" content="XHTML" /><meta name="DC.identifier" content="insert-toc-html-editor" /><link rel="stylesheet" type="text/css" href="../../../CSS/commonltr.css" /><title>Insert a table of contents in knowledge articles</title></head><body id="insert-toc-html-editor"> <h1 class="title topictitle1" id="ariaid-title1">Insert a table of contents in knowledge articles</h1> <div class="body taskbody"><p class="shortdesc">Insert a hierarchical table of contents (toc) based on the headings in your knowledge article.</p> <div class="section prereq p"> <span class="ph">Open the knowledge article in which you want to use the HTML editor.</span> <p class="p">Role required: none</p> </div> <div class="section context" id="insert-toc-html-editor__context_wmx_f53_vlb"> <span class="ph">You can also use the HTML editor when creating or editing a knowledge article using the <span class="ph">Knowledge Management</span> application in the <span class="ph">ServiceNow AI Platform</span> interface or in <span class="ph">Agent Workspace</span>. To create or edit a knowledge article in the <span class="ph">ServiceNow AI Platform</span> interface, see <a class="xref" href="create-knowledge-article.html" title="Knowledge contributors can create and edit knowledge articles within a knowledge base to share information across your organization.">Create a knowledge article</a> or <a class="xref" href="edit-knowledge-article.html" title="Edit knowledge articles within a knowledge base to update information shared across your organization.">Edit a knowledge article</a>. To create or edit a knowledge article in <span class="ph">Agent Workspace</span>, see <a class="xref" href="create-article-workspace.html" title="Create a knowledge article in Agent Workspace to share information across your organization.">Create a knowledge article in Agent Workspace</a> or <a class="xref" href="edit-article-workspace.html" title="Edit knowledge articles within a knowledge base in Agent Workspace to update information shared across your organization.">Edit a knowledge article in Agent Workspace</a>.</span> <div class="p">You can generate a table of contents only if your article uses heading levels from Heading 1 to Heading 3 and is a standard article.<div class="note"><span class="notetitle">Note:</span> Use Format select to set heading levels in the article. You can also configure the HTML toolbar using TinyMCE attributes. For more information, see <a class="xref" href="../administer/workspace/concept/tinymce.html" target="_blank" rel="noopener noreferrer">Customize TinyMCE attributes</a>. <img class="image" id="insert-toc-html-editor__image_bdj_zfg_tsb" src="../image/km-h1.png" alt="HTML toolbar" /></div> </div> </div> <ol class="ol steps"><li class="li step stepexpand"> <span class="ph cmd">In the Article body section, place the cursor where you want to insert the table of contents.</span> </li><li class="li step stepexpand"> <span class="ph cmd">Click the table of contents icon (<img class="image icon" id="insert-toc-html-editor__image_d5v_fkh_vlb" src="../image/toc.png" alt="Table of Contents icon" />) on the HTML toolbar.</span> <div class="itemgroup info">If you do not see the table of contents icon on the toolbar, add it using steps available in <a class="xref" href="../administer/workspace/concept/tinymce.html" target="_blank" rel="noopener noreferrer">Customize TinyMCE attributes</a>.</div> </li><li class="li step stepexpand"><strong>Optional: </strong> <span class="ph cmd">Update an existing table of contents by selecting it and then clicking the update icon (<img class="image icon" id="insert-toc-html-editor__image_bqn_hhb_xlb" src="../image/toc-update.png" alt="Update icon" />) on the HTML toolbar.</span> </li></ol> <div class="section result" id="insert-toc-html-editor__result_x2g_dv1_xlb">The HTML editor searches for the headings in your content including their levels (such as Heading 2 or Heading 3). It then automatically generates a table of contents that contains links to the heading levels from Heading 1 to Heading 3 only. The links to heading levels are indented to show the heading hierarchy.</div> </div> </body></html></div>