LukeCarrier / mkdocs-drawio-exporter

Exports your Draw.io diagrams at build time for easier embedding into your documentation
https://pypi.org/project/mkdocs-drawio-exporter/
MIT License
77 stars 8 forks source link

Using an <object> tag in created svg #20

Closed leros321 closed 3 years ago

leros321 commented 3 years ago

We are using your plugin within mkdocs pages with svg format. We found out, we cannot use interactivity within svg(hyperlinks) if <img> tag is used.

Is it possible instead of <img> tag to use <object> tag?

We tested it as following and hyperlinks from svg works only in object <object type="image/svg+xml" data="image.svg"></object>

LukeCarrier commented 3 years ago

@leros321 are you able to take a look at the changes in #24 for me? It should be possible to achieve what you're looking for with a configuration like this now:

plugins:
  - drawio-exporter:
    embed_format: '<object type="image/svg+xml" data="{img_src}"></object>'
LukeCarrier commented 3 years ago

I guess you found another solution, but this will be going out in 0.8.0 in a few minutes.