Auto generate a Table of Contents from headings on a page

I’ve a new little plugin to help with my SEO - it auto generates a Table of Contents from my H1, H2, H3 … headings on my Bubble page.

Good for documentation, good for SEO.

Table of contents plugin


Hello! Thanks for the plugin, at first glance it looks good. But I have questions.

I create my articles in Bubble’s rich text editor. I have headers H2, H3 and so on. But yours the plugin does not see them and does not provide a list. Does this mean it only works with static pages and I have to create each article manually? I would like to work in some kind of text editor, since I have a lot of articles.

If I misunderstood something, please make an example with the rich text editor from Bubble.

1 Like

Great @bubbledeveloper I hadn’t considered that use case :slight_smile: I’ve made a working example on the plugin page which shows how Rich Text content, rendered in a Bubble page after page load can be detected and included in the Table of Contents.

I’ve opened the link for the sample of the plugin but I don’t see the table of contents even after refreshing. Is there something more I’m supposed to do to get the plugin to work?

1 Like

Whoops that’s not good! Leave with me - I will fix it :slight_smile: (tomorrow)

1 Like

@anglilian Fixed the demo and made some enhancements. Now the default behaviour is to open up the table of contents, rather than collapse and hide the contents as you scrolled. The dynamic collapsing was “neat” but distracting. I want the Table of Contents to be less about navigation and more about describing the contents of the page. (clickable contents till works)

Have you fixed the case where the table of contents generates a TOC on the rich text field

Yes - look at this…

I’ve seen the TOC re-rendered, but those items don’t link to the HTML element’s heading tags

1 Like