Improvement: A user should be able to exclude headings from the ToC block in the editor. #69200
Labels
[Block] Table of contents (experimental)
Affects the Table of contents Block
[Type] Enhancement
A suggestion for improvement.
What problem does this address?
In the ToC block, there is currently no way to exclude a specific heading from the list. I'm aware of two workarounds, but neither is good, and they both have drawbacks:
One use case would be very long articles, meaning a long ToC. However, I can also see this feature being useful for cases where a heading is not "ToC worthy" but we still want to retain the article's semantic hierarchy.
What is your proposed solution?
I've outlined a solution in #69063, but after discussing it briefly with @swissspidy, I realized it seems a bit out of scope for the current PR. Also, I think more discussion on the specific UI could be helpful.
My solution relies on a class assigned to the heading, which is simple but also opaque if you don't read the code.
I will remove this functionality from #69063 to align it with the scope of #51605 and open a new PR with my suggestion to exclude headings to cover the issue you're reading now.
The text was updated successfully, but these errors were encountered: