Closed Shapeno closed 5 months ago
Please share the source markdown of that diagram
Hi, This is an example of what is no t working for me : Code: ` '''mermaid
graph TD; A-->B[far:fa-window-maximize B]; A-->C; B-->D; C-->D;
''' ` Render:
graph TD;
A-->B[far:fa-window-maximize B];
A-->C;
B-->D;
C-->D;
I hope this helps. Thanks
In the live Mermaid editor at mermaid.js.org, you can use FontAwesome 5 icons with the fa:fa-<icon-name>
syntax. This doesn't work in the VS Code extension, and like the original poster, I came here to see if it was something that could be enabled.
Please post the text of a diagram with the problem
Hi all,
If it helps, it's now working for me as I added this in my vscode config:
Please post the text of a diagram with the problem
graph LR
net[fa:fa-network-wired Network]
In the online editor, this gives:
(Not quite sure why it's truncated...)
Sounds like from the workaround that @Vince1024 posted above, it would be enough to tell the extension to use FontAwesome's CSS.
The solution that @Vince1024 posted worked for me as well. Just so others don't have to copy from a screenshot, here's the vscode config JSON required:
"markdown.styles": [
"https://use.fontawesome.com/releases/v5.7.1/css/all.css"
]
Is it possible for this plugin to use this stylesheet by default?
Closing as it looks like adding the style sheet fixes this. This is documented in: https://github.com/mjbvz/vscode-markdown-mermaid?tab=readme-ov-file#using-custom-css-in-the-markdown-preview
If this keeps coming up we can consider always loading the FA stylesheet too
the
::icon(fa fa-book)
is not rendered, but leaves a blank.