The plugin enables live editing and visualization of mermaid supported diagrams.
Related plugins:
- Open a file containing Mermaid diagram
- Choose
Preview Mermaid Diagram
- Move cursor inside the diagram
The plugin detects mermaid diagrams in the following formats:
<div class="mermaid">
sequenceDiagram A-->B: Works!
</div>
```mermaid sequenceDiagram A-->B: Works! ```
{{<mermaid attr="val">}} sequenceDiagram A-->B: Works! {{</mermaid>}}
.. mermaid:: :parameters: are optional sequenceDiagram A-->B: Works!
The plugin does not preview diagrams in external files:
.. mermaid:: graphs/mygraph.mmd
Files with extension .mmd
with plain Mermaid diagram content:
sequenceDiagram
A-->B: Works!
You can customize the appearence of the previewed diagrams by setting the mermaid configuration in the workspace settings:
{
"mermaid": {
"sequenceDiagram": {
"mirrorActors": false
}
}
}
All mermaid configuration options are supported.
You can render the diagram using a custom theme by providing the following configuration properties:
{
"mermaid": {
"theme": null,
"themeCSS": "the theme as string"
}
}
null
for theme
disables the authomatic theme detection, so you are responsible for providing a proper theme in themeCSS
for all diagrams used in the settings' scope.