mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-15 21:39:40 +02:00
Update usage.md
This commit is contained in:
@@ -92,7 +92,7 @@ Mermaid can load multiple diagrams, in the same page.
|
|||||||
|
|
||||||
## To enable click event and tags in nodes
|
## To enable click event and tags in nodes
|
||||||
|
|
||||||
A `securityLevel` configuration was introduced which sets the level of trust to be used on the parsed diagrams. In version 8.2 a security improvement was introduced.
|
A `securityLevel` configuration has to first be cleared, `securityLevel` sets the level of trust for the parsed diagrams. This was introduce in version 8.2 as a security improvement, aimed at preventing malicious use.
|
||||||
|
|
||||||
## securityLevel
|
## securityLevel
|
||||||
|
|
||||||
@@ -120,18 +120,6 @@ If you are taking resposibility for the diagram source security you can set the
|
|||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## To enable click event and tags in nodes:
|
|
||||||
|
|
||||||
In version 8.2 a security improvement was introduced. A `securityLevel` configuration was introduced which sets the level of trust to be used on the parsed diagrams.
|
|
||||||
|
|
||||||
* **true**: (default) tags in text are encoded, click functionality is disabled
|
|
||||||
* false: tags in text are allowed, click functionality is enabled
|
|
||||||
|
|
||||||
⚠️ **Note** : This changes the default behaviour of mermaid so that after upgrade to 8.2, if the `securityLevel` is not configured, tags in flowcharts are encoded as tags and clicking is prohibited.
|
|
||||||
|
|
||||||
If your application is taking resposibility for the diagram source security you can set the `securityLevel` accordingly. By doing this clicks and tags are again allowed.
|
|
||||||
|
|
||||||
|
|
||||||
### Labels out of bounds
|
### Labels out of bounds
|
||||||
|
|
||||||
If you use dynamically loaded fonts that are loaded through CSS, such as Google fonts, mermaid should wait for the
|
If you use dynamically loaded fonts that are loaded through CSS, such as Google fonts, mermaid should wait for the
|
||||||
@@ -160,6 +148,7 @@ If your page has other fonts in its body those might be used instead of the merm
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
# This likely requires a `script.js` file, separate from the `HTML`.
|
# This likely requires a `script.js` file, separate from the `HTML`.
|
||||||
|
|
||||||
### Calling `mermaid.init`
|
### Calling `mermaid.init`
|
||||||
|
|
||||||
By default, `mermaid.init` will be called when the document is ready, finding all elements with
|
By default, `mermaid.init` will be called when the document is ready, finding all elements with
|
||||||
|
Reference in New Issue
Block a user