Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gutenberg dynamic blocks that insert headers #68

Closed
djped opened this issue Apr 13, 2019 · 1 comment
Closed

Gutenberg dynamic blocks that insert headers #68

djped opened this issue Apr 13, 2019 · 1 comment
Labels

Comments

@djped
Copy link

djped commented Apr 13, 2019

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?

@ekalinin
Copy link
Owner

IIUC your question: yes, you can use this:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants