revolunet/sublimetext-markdown-preview

How to changer the tag parsering order in order to get TOC as a side bar?

lencshu opened this issue · 2 comments

I want badly to render the html with a TOC as a fixed sidebar. Almost done, but I am blocked by changing the order of tags inside the html file. Here is the detail:

I have added css to the markdown.css

.toc {
    height: 100%; 
    float:left;
    overflow-y:scroll;
    padding-right: 10px;
    position: fixed;
    width:36%;
...
    }
.markdown-body {
...
    float:right;
    padding-left: 10px;
    width:60%;
}

Inside the HTML file, the toc is always in the article

<article class="markdown-body"><div class="toc">.......</div></article>

Things I want to change:

<div class="toc">.......</div> <article class="markdown-body"></article>

I spent all day on searching the function of rendering the order, but I got noting.

Does anyone have any suggestions as to how to do this? Any suggestions or help would be appreciated!

You can move it with your own custom JavaScript. That's pretty much it. Unfortunately, I don't have time to help people with there own JS and CSS customizations. You'll have to research how to do such things with JS and CSS.

Closing this as their is no actionable item here. This is more user customization stuff.