Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). UI Patterns (SDC in Drupal UI) 2.0.18 Minor update available for module ui_patterns (2.0.18). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

Custom TOC

No security coverage
View on drupal.org

Custom TOC allows editors to create and manage tables of contents within Drupal. It offers a field type that stores editable TOC markup, and a CKEditor widget to generate a starter TOC from a chosen source field, enabling editors to refine link text for each page. The formatter then displays the saved TOC, ensuring consistency between the draft and published content.

Overview

Custom TOC provides a field type that stores editable Table of Contents markup. The CKEditor widget can generate a starter TOC from a chosen source field and lets editors refine link text per page. The formatter renders the saved TOC so the published page matches the stored field value.

Features

  • Generate a TOC from headings and edit link text per node.
  • Keep TOC output stable across view modes.
  • Handle missing or removed fields safely.

Requirements

  • Drupal core 10 or 11.
  • toc_api module enabled.

Installation

  1. Enable the module.
  2. Add the "TOC (CKEditor)" field to a content type.
  3. Select a formatted text source field (text processing enabled).

Configuration

  • Choose the source field for heading extraction.
  • Set allowed text formats and a default format.
  • Configure toc_api "TOC type" settings for headings and template.

Usage

  1. Create or edit content with headings in the source field.
  2. Click "Regenerate TOC" to build the initial markup.
  3. Optionally edit the TOC HTML, then save the node.

Notes

  • Avoid enabling toc_api_example to prevent heading id changes on view.

Activity

Total releases
2
First release
Jan 2026
Latest release
6 months ago
Releases (12 mo)
2 ▲ from 0
Maintenance
Slowing

Releases

Version Type Release date
1.0.1 Stable Jan 17, 2026
1.0.0 Stable Jan 17, 2026