markdown-viewer icon indicating copy to clipboard operation
markdown-viewer copied to clipboard

How to include a mermaid chart containing href tag in markdown

Open AndOne02 opened this issue 3 years ago • 4 comments
trafficstars

Hi, thanks to this extension, I can create a chart using mermaid. The next step is to make a chart contain links to navigate to different urls. Right now, it looks like this

Problem

The corresponding code is this Code

It seems easy but just got stuck in this. Any ideas to help me out?

AndOne02 avatar Feb 22 '22 03:02 AndOne02

Not sure tbh, I was able to reproduce it:

graph TD
  A[This is an important <a href='https://google.com'>click me</a>]

simov avatar Feb 22 '22 12:02 simov

Maybe more detailed info. Those lines are in a local markdown file and chrome with this extension is used to open it. I can't add link in mermaid graph. If in mermaid itself, it works. I don't know whether this will make any difference to you.

ghost avatar Feb 22 '22 13:02 ghost

Find something here. https://mermaid-js.github.io/mermaid/#/usage?id=enabling-click-event-and-tags-in-nodes mermaid

Could I customize this security level to loose or select the version of mermaid in this extension?

ghost avatar Feb 22 '22 14:02 ghost

Sure, pull this repository and search for mermaid here: https://github.com/simov/markdown-viewer/blob/master/content/index.js

Follow the manual install instructions after that: https://github.com/simov/markdown-viewer#manual-install

simov avatar Feb 22 '22 14:02 simov

Mermaid got updated in the latest Markdown Viewer v5, you can download it from the Chrome Web Store or from the releases section here.

simov avatar Dec 10 '22 17:12 simov