Skip to content
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

Ability to override the mermaid initialize configuration #3

Open
johannesprinz opened this issue Jul 14, 2021 · 0 comments
Open

Ability to override the mermaid initialize configuration #3

johannesprinz opened this issue Jul 14, 2021 · 0 comments

Comments

@johannesprinz
Copy link

Some modern tooling like the C4 Model structurize CLI render mermaid diagrams with inline styles controlled by inline html tags within mermaid diagrams. This requires the following configuration to be injected into the mermaid.initialize function:

{
  startOnLoad: false,
  securityLevel: 'loose'
}

Any chance of modifying mermaid-render.html line 10 to allow a way to inject a custom configuration.

Suggest some way to populate mermaidConfig from the mermaid file or organizational setting and inject below:

    <script>mermaid.initialize(mermaidConfig || {startOnLoad:false});</script>
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

No branches or pull requests

1 participant