toc_js currently exposes its TOC via a block. This works well for Layout Builder pages or theme-level placements (e.g., in a node Twig), but it does not give editors per-content, in-body control of where the TOC appears. They cannot place the TOC after an intro paragraph, between sections, etc.
This change adds a Text Filter that lets authors insert a simple token ([toc]) at the desired location in the body. The filter reuses the existing toc_js block (and its configuration/options) and renders that block output exactly where the token appears—delivering the same frontend behavior with much finer editorial control.
toc_js and add its TOC via the provided block.h2/h3).Add a CKEditor 5-compatible Text Filter that:
toc_js block (heading levels/depth, label, container classes, etc.) on a per-Text-Format basis.toc_js block at the token location, so output and behavior match the block 1:1.toc_js library exactly once; guards against duplicate attachments.toc_js_filter submodule) appears under Configuration → Content authoring → Text formats and editors.toc_js block options (heading levels, depth, label, classes, list type, numbering, anchor prefix, scope selector).toc_js block plugin; no public API changes in toc_js itself.Needs review
3.3
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
No activities found.