sytsereitsma / mdbook-plantuml

mdBook preprocessor to render PlantUML diagrams to png images in the book output directory
MIT License
76 stars 14 forks source link

Creating DataURI for image inlining #31

Closed niko-dunixi closed 2 years ago

niko-dunixi commented 2 years ago

Should solve the issue for this preprocesssor and create a better user-experience. Also enables other downstream renderers to work agnostically and not only the html renderer.

niko-dunixi commented 2 years ago

The one thing I was not really able to fully test and what I'd like some guidance on, is how we can test the text/plain as an image src. From what I can tell the text/plain is a fully valid data uri option image

What I don't know if it will embed as I expect when placed into an image tag.

Currently I'm not sure how you get plantuml to generate text instead of an svg. Perhaps there is a bug, but using plantuml,txt instead of just plain plantuml didn't actually generate text output.

I can revert to the original method already in use for embedding text if this doesn't actually work as expected, but I just need to know how to generate those text documents.

niko-dunixi commented 2 years ago

AH! It was my mistake. I somehow read plantuml,txt instead of plantuml,format=txt. I'll restore that branch of functionality.