Warning
Please edit the corresponding file in /packages/mermaid/src/docs/config/setup/modules/config.md.
• Const
defaultConfig: MermaidConfig
▸ addDirective(directive
): void
Pushes in a directive to the configuration
Name | Type | Description |
---|---|---|
directive |
any |
The directive to push in |
void
▸ getConfig(): MermaidConfig
Function | Description | Type | Return Values |
---|---|---|---|
getConfig | Obtains the currentConfig | Get Request | Any Values from current Config |
Notes: Returns any the currentConfig
MermaidConfig
The currentConfig
▸ getSiteConfig(): MermaidConfig
Function | Description | Type | Values |
---|---|---|---|
setSiteConfig | Returns the current siteConfig base configuration | Get Request | Returns Any Values in siteConfig |
Notes: Returns any values in siteConfig.
MermaidConfig
The siteConfig
▸ reset(config?
): void
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 could be reset to. | Dictionary | Required | Any Values, with respect to the secure Array |
Notes: (default: current siteConfig ) (optional, default getSiteConfig()
)
Name | Type | Default value | Description |
---|---|---|---|
config |
MermaidConfig |
siteConfig |
base set of values, which currentConfig could be reset to. Defaults to the current siteConfig (e.g returned by getSiteConfig). |
void
▸ sanitize(options
): void
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 Notes: modifies options in-place
Name | Type | Description |
---|---|---|
options |
any |
The potential setConfig parameter |
void
▸ saveConfigFromInitialize(conf
): void
Name | Type |
---|---|
conf |
MermaidConfig |
void
▸ setConfig(conf
): MermaidConfig
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 siteConfig value.
Name | Type | Description |
---|---|---|
conf |
MermaidConfig |
The potential currentConfig |
MermaidConfig
The currentConfig merged with the sanitized conf
▸ setSiteConfig(conf
): MermaidConfig
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 the currentConfig to siteConfig. Calls to reset(configApi.defaultConfig) will reset siteConfig and currentConfig to the defaultConfig Note: currentConfig is set in this function Default value: At default, will mirror Global Config
Name | Type | Description |
---|---|---|
conf |
MermaidConfig |
The base currentConfig to use as siteConfig |
MermaidConfig
The new siteConfig
▸ updateCurrentConfig(siteCfg
, _directives
): MermaidConfig
Name | Type |
---|---|
siteCfg |
MermaidConfig |
_directives |
any [] |
MermaidConfig
▸ updateSiteConfig(conf
): MermaidConfig
Name | Type |
---|---|
conf |
MermaidConfig |
MermaidConfig