ekalinin / github-markdown-toc

Easy TOC creation for GitHub README.md

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Gutenberg dynamic blocks that insert headers

djped opened this issue · comments

commented

I've been working on some dynamic blocks for Gutenberg (dynamic in that they output html in the render_callback of block registration). Any headings I insert into the content in this way are not picked up by Easy TOC. Not inserted into the TOC at all.

I'm using the shortcode, not automatic TOC insertion.

I think this is because the shortcode runs before the blocks are rendered and builds the TOC against the stored post content, not the actual final output.

Is there anything i can do to easily change easy TOC so that the shortcode just adds filters to insert the TOC that run on the final content?