diff --git a/docs/usage.md b/docs/usage.md index 8f2a0de0b..49433be93 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -81,6 +81,24 @@ Would end up like this: ``` +An id attribute is also added to mermaid tags without one. ## Simple full example: + +### 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. + +```javascript + mermaidAPI.initialize({ + securityLevel: 'loose' + }); +``` ## Notes: An id attribute is also added to mermaid tags without one.