Floating [TOC] sidebar using custom CSS #211
erkamakbas
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Floating
[TOC]sidebar using custom CSSMarkdownPreview already supports Python-Markdown's TOC extension, so a Markdown file can include:
By default, this creates an inline table of contents. For long technical documents, I wanted a right-side floating outline/sidebar similar to documentation sites.
This can be done without changing MarkdownPreview itself by using the existing custom CSS support.
MarkdownPreview setting
In
MarkdownPreview.sublime-settings:{ "parser": "markdown", "css": { "markdown": [ "default", "C:/path/to/markdownpreview-floating-toc.css" ] } }Example CSS
Notes
.tocelement generated by Python-Markdown'smarkdown.extensions.toc.Suggestions or improvements are welcome.
All reactions