Merge pull request #1585 from GDFaber/feature/1460_add_link_target_to_flowchart_click

Add link target option to flowchart click
This commit is contained in:
Knut Sveidqvist
2020-07-29 15:13:35 +02:00
committed by GitHub
8 changed files with 85 additions and 29 deletions

View File

@@ -562,6 +562,23 @@ graph LR
?> Due to limitations with how Docsify handles JavaScript callback functions, an alternate working demo for the above code can be viewed at [this jsfiddle](https://jsfiddle.net/s37cjoau/3/).
Links are opened in the same browser tab/window by default. It is possible to change this by adding a link target to the click definition (`_self`, `_blank`, `_parent` and `_top` are supported):
```
graph LR;
A-->B;
B-->C;
click A "http://www.github.com" _blank
click B "http://www.github.com" "Open this in a new tab" _blank
```
```mermaid
graph LR;
A-->B;
B-->C;
click A "http://www.github.com" _blank
click B "http://www.github.com" "Open this in a new tab" _blank
```
Beginners tip, a full example using interactive links in a html context:
```
<body>