Closed Lazzaretti closed 1 month ago
Hi, I was working on this issue quite some time ago. See #9 and #8 for reference. I decided to delete the PR, because it introduced too much dependencies here.
I've just published the (companion) plugin to Pypi. If you have any issues, feel free to open them on the dedicated issue tracker.
@oniboni @Lazzaretti plugin.py
if get_url is not None:
return f"![Kroki]({get_url})"
change to
if get_url is not None:
return f'<object type="image/svg+xml" data="{get_url}" style="max-width:100%"></object>'
@llibeohs I've tried your solution, sadly the fonts are still missing in Firefox and Chrome for me. But the investigation goes on :detective:
I try to use an excalidraw diagram. The diagram is shown; however, the fonts are incorrect (the fallback fonts are used).
Problem
The fonts are not embedded; they are links. These links don't work when you add an SVG with an
<img
tag in HTML.Example
excalidraw in mkdocs:
When opening the image in a new tab:
The diagram is copied from https://kroki.io/#try
Possible Solution
A possible solution would be to use
EmbedImages
https://github.com/AVATEAM-IT-SYSTEMHAUS/mkdocs-kroki-plugin/issues/31