Components
Table of Contents Element

Table of Contents Element

Renders a table of contents element with clickable links to headings in the document.

Table of Contents

The Table of Contents (TOC) feature allows you to create an automatically updated overview of your document's structure.
How to use the Table of Contents:
  • Type "/toc" and press Enter to create the TOC.
  • The TOC updates automatically when you modify headings in the document.


Example Content

This is an example of content that would be reflected in the Table of Contents.

Subsection

Adding or modifying headings in your document will automatically update the TOC.

Benefits of Using TOC

A Table of Contents improves document navigation and provides a quick overview of your content structure.

Installation

Install the following dependencies:

npm install @udecode/plate-selection @udecode/plate-heading

Copy and paste the following code into your project.

Get the code ->

Update the import paths to match your project setup.