Mermaid : URL opens in flowchart, but not in graph

Steps to reproduce

Graph below does not open URL when clicking A node : is there something missing ?

```mermaid
graph TD

A --> B

click A "http://www.google.com"

It seems related to securityLevel, but not sure how to edit this variable.

Expected result

Link should open. It seems to work here.

Environment

Windows 10
Obsidian 0.12.12

Workaround

Problem was mentioned here (December 2020). A workaround is to use flowcharts instead of graphs.

```mermaid
flowchart TD

A --> B

click A "http://www.google.com"

Would be real neat if that worked. Maybe turn it into a FR?

I had to laugh when reading the title: “Nothing happens.” Who still knows the original ADVENTURE? :wink:

Thanks @Moonbase59 : what do you mean by “FR” ?

Feature Request, sorry.

1 Like

Instead of using the click directive, try using class internal-link instead:

image

Thanks @Craig : should this work with URLs ? It seems your solution only work for internal links.

Oh, oops! I misread your question. The approach I suggested only works with internal links. Sorry about that.

However, when I tried your example with graph vs. flowchart, both external links “A” work for me. I’m running Obsidian v0.12.13 on Linux. The only difference I can see is that I included semicolons at the end ofeach line.

Just tried your example, still does not work here : The only difference I see is OS (Linux vs Windows).

In the link posted above and showing a working example, Linux is also used (if I’m not mistaken).

Thanks for trying.

I notice there is a difference in the generated HTML for the two links.

The link that works (flowchart) looks like this:

The link that doesn’t work looks like this:

So they are definitely being rendered differently to HTML.

And I see now that while both are clickable, only the flowchart one will actually open a new browser window. (Clearly I need to drink my coffee before jumping into technical discussions. :slight_smile: )

I don’t know if this is a Mermaid issue or an Obsidian issue. I think we’ll have to defer to the devs.

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