I would like to have links from an svg file to other files in my vault

Things I have tried

  href="note.md" in an .svg file where note.md is in my vault.

What I’m trying to do

Click on the svg element and have obsidian open note.md.

You have an svg element embed in a note and want that this element works as a link to another note?

I do not want the entire embedded svg to be a link, but I have an embedded svg diagram with say two circles and inside the svg I have href=note1.md for one circle and href=note2.md for the other circle. I want to press either circle and be taken to the appropriate note.

I don’t know well how to work “inside” svg (I just create svg in another app as graphic elements, never thinking in it as a more interactive element).

But just applying some logic, you need to be attention to this: an internal link is a special class (class="internal-link"). So, you need to add a class or - I’m note sure - changing the “href” to an obsidian app url format - similar to “obsidian://open?vault=…”

What app do you use to make svg? I am using inkscape and it has a “link” menu item for individual graphic elements. I believe it is a standard.

It’s a graphic tool - Sketch - for mac. But doesn’t has any feature to add links.
I don’t know if it’s a standard or not. However, you need to format your html code in way to be understood as an internal link.
If you use an external link (e.g. href=“https://www.nytimes.com”) it works?

No, an external link does not work in obsidian. I am now trying your suggession of href=obsidian://open?vault=obsidian1&name=note1

Why don’t you try the Excalidraw plugin? I never tried, but maybe it works in the way you want.

I will try GitHub - zapthedingbat/drawio-obsidian: Draw.io plugin for obsidian.md but I need to take a break and get back to this … thanks for the help so far.

I am also looking for this, because SVG itself can support text search and mapping (link to a certain part of the page, or external link),
but Obsidian does not seem to be able to parse it completely.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.