Strapi is an open-source headless CMS (Content Management System) that allows developers to build, deploy, and manage content-rich websites and applications.
A Table of Contents (TOC) is a list of headings that provides an overview of the content of a document. TOCs are typically found at the beginning of longer documents, such as reports, ebooks, and articles, and can help readers quickly navigate to the specific section they are interested in.
Including a TOC in your content can improve user experience and make your content more accessible and readable.
Here's mine:
- What will we implement?
- Lifecycle hooks in Strapi
- Add id attribute in headers of content
- Create a table of contents
Recently, we wanted to create a custom table of contents field for our website content. We searched online for references but couldn’t find a satisfactory solution. Thus, we decided to implement it ourselves.
I would like to share the same with you guys with the aim that it might save a bit of your time.
I used CKEditor as the rich text editor. Feel free to use your favorite one.
Looking for step by step guide? Check out Canopas Blog.