gmunguia / markdown-it-plantuml

:herb: :book: plantuml diagrams in your markdown
MIT License
98 stars 21 forks source link

Add option to add class attribute to generated img tags #24

Closed truh closed 2 years ago

truh commented 3 years ago

Allow the user to specify a class name in options.className, the class name is added to all <img> tags generated by this plugin.

Goal of this change is to make it easier to style tags produced by markdown-it-plantuml.

gmunguia commented 3 years ago

Thanks for contributing 🙌 .

To avoid feature creep, having to change the API (and typings), etc. I'll probably instead add a static class name to all images. Would that work for your project (doing a one-person-cohort study here)? I know this is not as elegant, but a better trade-off in my opinion.

Feel free to add the static class yourself. Otherwise, I'll add it to the library when I get the time.