mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-11-15 18:24:33 +01:00
Docs updated from code
This commit is contained in:
@@ -794,11 +794,20 @@ mermaidAPI.initialize({
|
|||||||
|
|
||||||
## setSiteConfig
|
## setSiteConfig
|
||||||
|
|
||||||
|
## setSiteConfig
|
||||||
|
|
||||||
|
| Function | Description | Type | Values |
|
||||||
|
| ------------- | ------------------------------------- | ----------- | --------------------------------------- |
|
||||||
|
| setSiteConfig | Sets the siteConfig to desired values | Put Request | Any Values, except ones in secure array |
|
||||||
|
|
||||||
|
**Notes:**
|
||||||
Sets the siteConfig. The siteConfig is a protected configuration for repeat use. Calls to reset() will reset
|
Sets the siteConfig. The siteConfig is a protected configuration for repeat use. Calls to reset() will reset
|
||||||
the currentConfig to siteConfig. Calls to reset(configApi.defaultConfig) will reset siteConfig and currentConfig
|
the currentConfig to siteConfig. Calls to reset(configApi.defaultConfig) will reset siteConfig and currentConfig
|
||||||
to the defaultConfig
|
to the defaultConfig
|
||||||
Note: currentConfig is set in this function
|
Note: currentConfig is set in this function
|
||||||
|
|
||||||
|
\*Default value: At default, will mirror Global Config\*\*
|
||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
- `conf` the base currentConfig to use as siteConfig
|
- `conf` the base currentConfig to use as siteConfig
|
||||||
@@ -807,13 +816,27 @@ Returns **any** the siteConfig
|
|||||||
|
|
||||||
## getSiteConfig
|
## getSiteConfig
|
||||||
|
|
||||||
Obtains the current siteConfig base configuration
|
## getSiteConfig
|
||||||
|
|
||||||
|
| Function | Description | Type | Values |
|
||||||
|
| ------------- | ------------------------------------------------- | ----------- | --------------------------------- |
|
||||||
|
| setSiteConfig | Returns the current siteConfig base configuration | Get Request | Returns Any Values in siteConfig |
|
||||||
|
|
||||||
|
**Notes**:
|
||||||
|
Returns **any** values in siteConfig.
|
||||||
|
|
||||||
Returns **any**
|
Returns **any**
|
||||||
|
|
||||||
## setConfig
|
## setConfig
|
||||||
|
|
||||||
Sets the currentConfig. The param conf is sanitized based on the siteConfig.secure keys. Any
|
## setConfig
|
||||||
|
|
||||||
|
| Function | Description | Type | Values |
|
||||||
|
| ------------- | ------------------------------------- | ----------- | --------------------------------------- |
|
||||||
|
| setSiteConfig | Sets the siteConfig to desired values | Put Request | Any Values, except ones in secure array |
|
||||||
|
|
||||||
|
**Notes**:
|
||||||
|
Sets the currentConfig. The parameter conf is sanitized based on the siteConfig.secure keys. Any
|
||||||
values found in conf with key found in siteConfig.secure will be replaced with the corresponding
|
values found in conf with key found in siteConfig.secure will be replaced with the corresponding
|
||||||
siteConfig value.
|
siteConfig value.
|
||||||
|
|
||||||
@@ -825,12 +848,25 @@ Returns **any** the currentConfig merged with the sanitized conf
|
|||||||
|
|
||||||
## getConfig
|
## getConfig
|
||||||
|
|
||||||
Obtains the currentConfig
|
## getConfig
|
||||||
|
|
||||||
|
| Function | Description | Type | Return Values |
|
||||||
|
| --------- | ------------------------- | ----------- | ----------------------------- |
|
||||||
|
| getConfig | Obtains the currentConfig | Get Request | Any Values from currentConfig |
|
||||||
|
|
||||||
|
**Notes**:
|
||||||
|
Returns **any** the currentConfig
|
||||||
|
|
||||||
Returns **any** the currentConfig
|
Returns **any** the currentConfig
|
||||||
|
|
||||||
## sanitize
|
## sanitize
|
||||||
|
|
||||||
|
## sanitize
|
||||||
|
|
||||||
|
| Function | Description | Type | Values |
|
||||||
|
| -------- | -------------------------------------- | ----------- | ------ |
|
||||||
|
| sanitize | Sets the siteConfig to desired values. | Put Request | None |
|
||||||
|
|
||||||
Ensures options parameter does not attempt to override siteConfig secure keys
|
Ensures options parameter does not attempt to override siteConfig secure keys
|
||||||
Note: modifies options in-place
|
Note: modifies options in-place
|
||||||
|
|
||||||
@@ -840,7 +876,18 @@ Note: modifies options in-place
|
|||||||
|
|
||||||
## reset
|
## reset
|
||||||
|
|
||||||
Resets this currentConfig to conf
|
## reset
|
||||||
|
|
||||||
|
| Function | Description | Type | Required | Values |
|
||||||
|
| -------- | ---------------------------- | ----------- | -------- | ------ |
|
||||||
|
| reset | Resets currentConfig to conf | Put Request | Required | None |
|
||||||
|
|
||||||
|
| Parameter | Description | Type | Required | Values |
|
||||||
|
| --------- | ------------------------------------------------------------- | ---------- | -------- | -------------------------------------------- |
|
||||||
|
| conf | base set of values, which currentConfig coul be **reset** to. | Dictionary | Required | Any Values, with respect to the secure Array |
|
||||||
|
|
||||||
|
\*Notes :
|
||||||
|
(default: current siteConfig ) (optional, default `getSiteConfig()`)
|
||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user