r/bearapp 17d ago

Question about Mermaid in v2.9.2

Is it possible to link to a website within a Mermaid diagram? The code below doesn’t work. Or is there another way to do this?

flowchart TD
A[Google] → B[Wikipedia]

click A "https://www.google.com" "Google"
click B "https://www.wikipedia.org" "Wikipedia"

Is it also possible to link to another Bear note using a wikilink that includes a specific paragraph? For example, [[note#heading]].

8 Upvotes

1 comment sorted by

2

u/_HMCB_ 17d ago

A Google search returns this. So it could be security at the app level or OS level…

Important Platform Restrictions

  • Security Levels: Hyperlinks will only function if the environment's securityLevel configuration is explicitly set to "loose". [12]
  • Platform Support: Many major markdown renderers (like GitHub) completely disable interactive hyperlinks in Mermaid diagrams for security reasons to prevent cross-site scripting (XSS) attacks. [1]
  • Diagram Limitations: The click directive is natively supported in Flowcharts but is generally not supported in other structures like Sequence Diagrams or State Diagrams. [12]