I was surprised to not find an existing feature request for this one, but I did search a bit and only found brief mentions in otherwise unrelated discussions. So the request is simple: some kind of Table of Contents feature, for docs, certainly, but perhaps even just overall for Rich Text. Maybe even as a kind of Block in the upcoming [IN DEV] Migrate Entity View to Blocks paradigm.
Personally, though, I’d love to see it as something that can optionally “float” or exist outside/alongside the main contents. Not so much as a traditional book-style ToC, as-in a Word doc, but rather as a navigation aid. That said, depending on how flexible Blocks can be, an option in a ToC block to simply “dock and float right/left on scroll” would satisfy that need very well.
If I were to outline my perfect ToC functions, it would look something like the following, though I realize some of these may be a big ask, or too much work to do for the context in Fibery (which is not intended to be a sophisticated doc editor, I think; more about getting work done).
- Block-based, can be instantiated anywhere in a Doc or Rich Text
- Ability to configure what header levels it shows
- Optional collapsible headers, possibly with a “Collapsed by default” and/or “Only one header expanded at a time” options
- Click to navigate to headers with a click
- Option to display alongside doc contents somehow
- Ideally the ability to “float” and scroll with the user’s view as a navigation aide
Using the ToC for navigation and having clickable header links suggests that this would rely on/require implementation of Anchor Links. Or at the least that adding Anchor Link functions would follow well from having clickable nav from a ToC.
Anyone else want something in a ToC feature that I missed? I made this post a Wiki, so feel free to edit and add your own bullets for additional desired ToC-specific features.