I’m +1 on this plugin Idea. I’d love to have a Table of Contents outline that is automatically updated in my document. It’s a useful feature in other note apps and I’m glad to see it being addressed here.
And, I agree this feature is perfect for a community or core plugin.
Update
I just found the core plugin Outline and it does what I was looking for. When turned on there is a document outline / Table of Contents based on headers in the left panel. If I click on the outline heading in the panel, the cursor jumps to that position in the main window document. Perfect.
I think the updating automatically is the issue, but I just close and reopen the doc to update the outline. Thanks
Thanks for that , works nicely but i see some issues.
It only sees Header one and two. Header three is not showing.
Underlying header does not print previous header. So for example when i start a header 2 under header 1 i would expect something like 1.1 but it only prints 1
The floating Toc plugin is currently working flawlessly for me here- and it even implement that in the way i like most wich is besides the main document (much like the outline panel), so one can quickly jump to other headers no matter where they are on the page.
Thank for the css it now has the output as i like it.
And the third header is also solved. Apparently when you have one space too many the header is not seen as a header So i was have 2 Spaces in between the # and the header.
I notice the references in the toc refer to obsidian locations. Can i also refer just to the headers inside the document without refering to obsidian. I wan to be able to export the note to PDF and send this to someone that does not have my obsidian
This is a one-liner that displays an automatically-updating table of contents inside the note, rather than in the sidebar and/or manually copy/pasting.
Maybe i didn’t explain very well.
My suggestion is very simple and doable, we only need a copy button in the core Outline plugin tab
This way we could paste a nicely formatted toc into our notes. I myself wrote a script copying a table of content to the clipboard. Then i copy this wiki-links into my note. It’s a bit manually but hey, i think adding a toc is something you do at the end of the day, basically for your readers and less, for yourself
I’d like to have this one integrated in Obsidian
I love your solution and am using it widely.
I’m not very savvy when it comes to js though and I’d like to remove the numbering. Is that possible within the script, or would I have to do it with css?
There’s not a specific class to the TOC, and I don’t want to hide the numbering everywhere…