Skip to main content

MermaidSecurityLevel

Namespace: Wisej.Web.Ext.Mermaid

Assembly: Wisej.Web.Ext.Mermaid (4.1.0.0)

Mermaid security levels (maps to Mermaid's securityLevel option).

public enum MermaidSecurityLevel

Example:

// Recommended default for server-rendered apps: strict sanitization.
mermaid.Config.SecurityLevel = Wisej.Web.Ext.Mermaid.MermaidSecurityLevel.Strict;
mermaid.ApplyOptions();

Fields​

NameDescriptionValue
AntiscriptDisables script execution but keeps a more permissive configuration than Strict.
LooseAllows a broader set of features/content than Strict.
SandboxRenders diagrams in a sandboxed iframe.
StrictStrict mode (default in Mermaid): sanitizes HTML and restricts potentially unsafe features.

Used By​

NameDescription
Mermaid.SecurityLevelReturns or sets the security level (maps to Mermaid's securityLevel).
MermaidConfiguration.SecurityLevelReturns or sets the security level (maps to Mermaid's securityLevel).