Working with Mermaid js to make flowcharts and can't seem to find a way to wrap links around to a new "line" so to speak. Docs and Googling haven't gotten me anywhere. Does anyone know if it is possible to create a link to replace the red line?
Mermaid JS does not support line wrapping for links by default. However, you can try to use a combination of HTML and CSS to achieve the desired effect. Here's one way you can do it:
Add a class to the link in your Mermaid code and use CSS to style it as a block element:
Note that this approach is an workaround, and it may not work in all cases. Additionally, as Mermaidjs is a javascript library, this styling will only be applied on runtime and not on the final rendering.
Mermaid JS does not support line wrapping for links by default. However, you can try to use a combination of HTML and CSS to achieve the desired effect. Here's one way you can do it:
Add a class to the link in your Mermaid code and use CSS to style it as a block element:
linkClass "my-link" graph TD; A[Square] -->|Link text| B[Square];
.my-link { display: block; }
Use the word-wrap property to wrap the link text to a new line, if necessary:
.my-link { display: block; word-wrap: break-word; }
Use the white-space property to prevent the link text from breaking in the middle of a word:
.my-link { display: block; word-wrap: break-word; white-space: pre-wrap; }
Note that this approach is an workaround, and it may not work in all cases. Additionally, as Mermaidjs is a javascript library, this styling will only be applied on runtime and not on the final rendering.