-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Closed
Labels
[Block] Table of contents (experimental)Affects the Table of contents BlockAffects the Table of contents Block[Type] EnhancementA suggestion for improvement.A suggestion for improvement.[Type] PerformanceRelated to performance effortsRelated to performance efforts
Description
What problem does this address?
Right now the TOC block parses the content of the post on render, dynamically generating the list every time.
It works, but is a resources-intensive process and could be optimized.
What is your proposed solution?
Instead of building the TOC dynamically on render, we could do it via JS in the editor itself. This way it will be saved as a list and rendered a lot faster and efficiently.
The headings structure can be saved in the block attributes and updated on the fly as the post gets edited.
This would mean that the classic block will be ignored by the TOC block, but that is to be expected and in fact something we may want to enforce since users should be using the heading blocks to structure their content, and classic blocks can be converted to block-based content.
mcsf and mahnunchik
Metadata
Metadata
Assignees
Labels
[Block] Table of contents (experimental)Affects the Table of contents BlockAffects the Table of contents Block[Type] EnhancementA suggestion for improvement.A suggestion for improvement.[Type] PerformanceRelated to performance effortsRelated to performance efforts