-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Planning for Table of Content Block Functionality and Heading IDs #22874
Copy link
Copy link
Open
Labels
[Feature] Document OutlineAn option that outlines content based on a title and headings used in the post/pageAn option that outlines content based on a title and headings used in the post/page[Type] DiscussionFor issues that are high-level and not yet ready to implement.For issues that are high-level and not yet ready to implement.[Type] New APINew API to be used by plugin developers or package users.New API to be used by plugin developers or package users.
Metadata
Metadata
Assignees
Labels
[Feature] Document OutlineAn option that outlines content based on a title and headings used in the post/pageAn option that outlines content based on a title and headings used in the post/page[Type] DiscussionFor issues that are high-level and not yet ready to implement.For issues that are high-level and not yet ready to implement.[Type] New APINew API to be used by plugin developers or package users.New API to be used by plugin developers or package users.
Type
Fields
Give feedbackNo fields configured for issues without a type.
This issue sets up discussion started during a Core Editor chat for the functionality of a Table of Contents (TOC) Block. Currently, there are several PRs/Issues that provide possible solutions.
Add Table of Contents block (dynamic rendering + hooks version) PR #21234
"Table of Contents" Block PR #11047
#15426 (Closed) PR #15426
From a technical point, when working with a TOC block, how are items that aren't in blocks like headings and next page tags counted, and how is it determined if those items precede the current block? Counting Heading blocks is relatively easy, but counting all headings in the HTML is more difficult, and counting all headings in the HTML preceding the current block seems impossible in some situations. This challenge is compounded when considering if the headings are in a dynamic block.
Resolving these questions impacts:
Specific challenges that need feedback are:
Possible solutions include:
@ZebulanStanphill @mtias @youknowriad @MichaelArestad contributed to the original conversation. Additional feedback here is welcome.