I use https://github.com/jdbranham/grafana-diagram plugin on grafana which is based on mermaid, and I use click url utility of flowchart for drill down.
I want to open url in new window instead of refreshing current window, because user may need current window and drill down window at same time.
I've read the doc of mermaid and found that callback can be used in click. But as mermaid is used by grafana-diagram as a grafana plugin, so there is no appropriate time to define and execute a callback.
Is possible to support this?
click "http://www.google.com" "this is a tooltip" _blank
p.s. I borrow target=_blank from tag in html to represent open this url in new window.
Hi @pirDOL, I think we can add an optional target parameter. I'll take a look at it. I think we don't really need the frame-based options here, like _top or parent, but it won't hurt to let these pass as well just in case someone needs them.
Great idea, indeed. I often use some flowcharts based on mermaid within documentation (mkdocs / rtfd ).
The general rule I use is : when it is an interne link, open it in the same window, otherwise (external links) open a new window. Unfortunately mermaid flowchart links break this rule :(
I'm going to finish this in the upcoming week. It works but I still need to add or modify the unit tests for this change.
Most helpful comment
Hi @pirDOL, I think we can add an optional target parameter. I'll take a look at it. I think we don't really need the frame-based options here, like
_toporparent, but it won't hurt to let these pass as well just in case someone needs them.