nagaozen / markdown-it-toc-done-right

A table of contents (TOC) plugin for Markdown-it with focus on semantic and security. Made to work gracefully with markdown-it-anchor.
MIT License
133 stars 26 forks source link

I'd like to give an [.active] class to the chosen item. #63

Closed jjulee closed 8 months ago

jjulee commented 3 years ago

environment : vuecli 3 + typescript

I'd like to add a class to give a different style just the item I clicked on. What should I do?

Help me~

nagaozen commented 8 months ago

This feature is out-of-scope of this project. If you are running in the server, you could observer the URL hash property to highlight it in the server before dispatching the results to the client (by patching the response). If you are working on client, just manage the current item state in javascript.