-
|
Hello. I really love this library, it's exactly what I need for my website! However I noticed it does not add an ID for each heading element, so it can be used for things like a Table of Contents. |
Beta Was this translation helpful? Give feedback.
Answered by
ssssota
Sep 7, 2023
Replies: 1 comment 1 reply
-
|
Thanks for your question! You can use rehype-slug to add Please check this example! |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Lakelimbo
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for your question!
You can use rehype-slug to add
ids to headings!And, you can use remark-toc to add TOC in your document.
Please check this example!
https://stackblitz.com/edit/svelte-exmarkdown-heading-it-toc?file=src%2Flib%2Fheading-toc-plugin%2Findex.ts