Toc as the sidebar

I really like having a TOC in my longer notes, but have to have it hidden by default using:

<details markdown='1'>
<summary>Table of Contents</summary>
[[toc]]
</details>

Since I also like having the split view. And having a TOC will make the scroll position of the editor vs the viewer be out of sync.
Does anyone know of a better solution for that? (Having the editor and viewer scroll position be in sync when a TOC has been added)

4 Likes