Open rmannibucau opened 3 years ago
This is controlled by the svg-type
attribute (or diagram-svg-type
at the document level). If not specified you'll get whatever default value Asciidoctor decides to apply. Note that the base64 encoding is not a hack, but a means to make the generated HTML self contained. See https://docs.asciidoctor.org/asciidoc/latest/macros/image-svg/ for more details.
@pepijnve hmm, embedding the svg is self contained too so still sounds like the default for svg should change, no?
Edit: confirming it works with [plantuml, generated/xxx.svg, svg, role="myclass",opts=inline]
That's something Asciidoctor core does, not the diagram extension. The extension generates a file on disk and passes the path to that file on to Asciidoctor core.
@pepijnve I know but it is something I'd like to not be (ie when embedded the image is not even dumped physically)
BTW you should be able to get the behaviour you want by adding :diagram-svg-type: inline
to the attribute section of your file.
I know but it is something I'd like to not be (ie when embedded the image is not even dumped physically)
That's simply not possible today I'm afraid and I'm not inclined to add support for that. The extension uses those files on disk to avoid needlessly rerendering unchanged images for instance.
Ok I see, let's hope it is possible someday since temp images are very bothering in most editors and it is not alway easy to control them with imagesdir or equivalent. Thanks for the inline tip btw!
Hi,
It is possible to do svg image using plantUML (or some others) but it is integrated as an + base64 encoding. This makes the usage of SVG pretty impossible to add JS event handler on the SVG (which is one of the key facet of using SVG with vector one). Would be great to support to inject the SVG in the dom instead of relying on the encoding hack.