mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-11-19 12:14:07 +01:00
Merge pull request #3334 from mermaid-js/sidv/fixDoc
Add `sandbox` to `securityLevel` docs
This commit is contained in:
@@ -64,9 +64,9 @@ const config = {
|
||||
logLevel: 5,
|
||||
|
||||
/**
|
||||
* | Parameter | Description | Type | Required | Values |
|
||||
* | ------------- | --------------------------------- | ------ | -------- | ------------------------------- |
|
||||
* | securitylevel | Level of trust for parsed diagram | string | Required | 'strict', 'loose', 'antiscript' |
|
||||
* | Parameter | Description | Type | Required | Values |
|
||||
* | ------------- | --------------------------------- | ------ | -------- | ------------------------------------------ |
|
||||
* | securityLevel | Level of trust for parsed diagram | string | Required | 'sandbox', 'strict', 'loose', 'antiscript' |
|
||||
*
|
||||
* **Notes**:
|
||||
*
|
||||
@@ -74,6 +74,9 @@ const config = {
|
||||
* - **loose**: tags in text are allowed, click functionality is enabled
|
||||
* - **antiscript**: html tags in text are allowed, (only script element is removed), click
|
||||
* functionality is enabled
|
||||
* - **sandbox**: With this security level all rendering takes place in a sandboxed iframe. This
|
||||
* prevent any JavaScript from running in the context. This may hinder interactive functionality
|
||||
* of the diagram like scripts, popups in sequence diagram or links to other tabs/targets etc.
|
||||
*/
|
||||
securityLevel: 'strict',
|
||||
|
||||
|
||||
@@ -141,7 +141,7 @@ export const decodeEntities = function (text) {
|
||||
* @param {any} _txt The graph definition
|
||||
* @param {any} cb Callback which is called after rendering is finished with the svg code as inparam.
|
||||
* @param {any} container Selector to element in which a div with the graph temporarily will be
|
||||
* inserted. In one is provided a hidden div will be inserted in the body of the page instead. The
|
||||
* inserted. If one is provided a hidden div will be inserted in the body of the page instead. The
|
||||
* element will be removed when rendering is completed.
|
||||
* @returns {any}
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user