Is there any way to include TOC in saved html file?
Hi,
I searched all the discussion here but can't found the solution. I
know I can see the TOC on preview.
But is there any way to include the TOC into the saved html
file?
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Brett on 28 Mar, 2012 03:32 PM
Hey Allen,
No, there's no way currently. The TOC is generated with Javascript and isn't part of the actual markup. You can always include similar javascript in the exported HTML file, but I don't want to get into including a bunch of JS in the output. It's possible that I could grab that section of the DOM at the time of save and inject it, but I haven't looked into that yet.
For the time being I would recommend checking out a TOC-generator script and adding it to your HTML output. That way you have control over how it appears and where. A good starting point is <http://www.kryogenix.org/code/browser/generated-toc/>, which is what Marked's is based on.
-Brett
2 Posted by allen on 29 Mar, 2012 01:53 PM
Hi, Brett
Thanks for your direction. I'll take it as current solution.
But it's not so convenient to modify the HTML file in every saved.
Look forward to seeing the embedded TOC in saved HTML as an option.
Brett closed this discussion on 31 Mar, 2012 05:35 AM.