Skip to main content

MermaidConfiguration

Namespace: Wisej.Web.Ext.Mermaid

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

Represents the Mermaid initialization options passed to mermaid.initialize(...).

public class MermaidConfiguration

Instances of this class are created internally and are bound to a Mermaid widget: changing a property updates the owner widget. The Mermaid widget exposes the same settings directly through Look, Theme, SecurityLevel, LogLevel, DeterministicIds, FontFamily, ThemeVariables and Options.

Properties​

Instance member DeterministicIds​

Boolean: Returns or sets whether Mermaid generates deterministic IDs for the rendered elements. (Default: True)

Maps to Mermaid's deterministicIds option. The default is true.

Instance member Flowchart​

MermaidFlowchartConfiguration: Returns the flowchart-specific options (maps to Mermaid's flowchart option).

Instance member FontFamily​

String: Returns or sets the font family applied to the diagram text.

This maps to Mermaid's fontFamily option and accepts a CSS font-family list. When not set, it returns the name of the owner widget's Font. For the size, use the fontSize key in ThemeVariables.

Instance member LogLevel​

MermaidLogLevel: Returns or sets the level of the messages logged to the browser console (maps to Mermaid's logLevel). (Default: Trace)

The default is Trace, the most verbose level.

Instance member Look​

String: Returns or sets the diagram look (e.g. classic, neo, handDrawn). (Default: "classic")

This maps to Mermaid's look initialization option.

Instance member MaxTextSize​

Int32: Returns or sets the maximum number of characters allowed in the diagram source (maps to Mermaid's maxTextSize). (Default: 32000)

The default is 32000. Diagrams with a longer source are not rendered by Mermaid.

Instance member SecurityLevel​

MermaidSecurityLevel: Returns or sets the security level (maps to Mermaid's securityLevel). (Default: Strict)

The default is Strict.

Instance member Sequence​

MermaidSequenceConfiguration: Returns the sequence diagram specific options (maps to Mermaid's sequence option).

Instance member Theme​

String: Returns or sets the theme name (e.g. default, dark, forest, neutral, base). (Default: "default")

This maps to Mermaid's theme initialization option. The default is default.

Instance member ThemeVariables​

Dictionary<String, Object>: Returns the theme variables (maps to Mermaid's themeVariables).

Common keys include fontFamily, fontSize, primaryColor and lineColor. The property is read-only; add or change entries on the returned instance. Changing the entries doesn't update the owner widget automatically. Mermaid applies the variables only with the base theme.