mwilliamson / java-mammoth

Convert Word documents to simple and clean HTML
BSD 2-Clause "Simplified" License
250 stars 48 forks source link

Image converter add attribute id or class #28

Closed gowelaine closed 7 months ago

gowelaine commented 2 years ago

Hi, Is it possible to add attribute id or class on img tag during the ImageConverter process? So it's easy to identify each image after converter is done. for instance,

[image id="image-vangogh" src="/img/html/vangogh.jpg" alt="Van Gogh, Self-portrait"] Right now it seems only alt and src can be generated.

mwilliamson commented 7 months ago

I believe you should be able to supply any attributes from the image converter, including IDs and class names, which will be included in the outputted HTML.