Skip to content

Prevent Mermaid from running on load #398

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mootari
Copy link
Member

@mootari mootari commented Jun 22, 2025

When Mermaid loads it tries to render any element that has the class mermaid.

Initializing mermaid with loadOnStart: false (docs) can help prevent unexpected side effects.

The old docs aren't great, but I confirmed that 9.2.2 does default to true as well: https://github.com/mermaid-js/mermaid/blob/v9.2.2/packages/mermaid/src/mermaid.ts#L529

@mootari mootari requested a review from mbostock June 22, 2025 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant