Repository navigation
feat: Table of Contents Component - #241
Shadowfita wants to merge 0 commit into
Conversation
|
After further consideration, I will update this to include options in the menu to toggle between "Table of Contents" and "table of Child Pages" for #95 . Additionally, I will explore adding options for the table of contents to be in a sidebar, or floating based on scroll. |
|
Recent commits should now resolve #95 . |
|
Thank you for your contribution. The work looks promising, but I have a few reservations. At this stage, I’d prefer a floating TOC that is accessible on all pages over a Tiptap node extension. We can work more on the TOC positioning later. While the heading TOC and child pages TOC features are valuable, I don't think we're ready to implement them just yet. However, your current code will be very useful when we decide to move in that direction. Thank you for your work. |
|
Thanks @Philipinho. I hope it can be of value. May I ask what your reservations are outside of having it across all pages rather than a node extension? |
|
@Shadowfita I would not want to make this an editor node when we can have a global TOC available on all pages by default. It saves us more nodes to maintain. |
|
I have rebased my fork and created the appropriate branches for my pull requests, I will be re-opening the PR from the correct branch for this feature for future consideration @Philipinho , no action to take, just an FYI. |


This pull request adds an mvp table of contents component and resolves #204 and resolves #95 . I plan to add a node menu for style options, unsure if you would like to wait for those additions before considering.
I did some testing of the headings filter loop and it seldomly fires, so there shouldn't be a performance concern there. Happy to amend to match any codebase conventions however.
There may be some unnecessary code in the editor-ext lib, I'm not extremely familiar with tiptap editor extensions.