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

support mind map graph in mermaid v9.2.0+ #98

Open
oglops opened this issue Dec 8, 2022 · 0 comments
Open

support mind map graph in mermaid v9.2.0+ #98

oglops opened this issue Dec 8, 2022 · 0 comments

Comments

@oglops
Copy link

oglops commented Dec 8, 2022

Newer mind map graph uses lazy loading & async rendering features

which means I have to init mermaid similar to this

    <script type="module">
        import mermaid from '/mermaid/mermaid.esm.min.mjs';
        import mindmap from '/mermaid/mermaid-mindmap.esm.min.mjs';

        const conf = {
        startOnLoad: true,
        };

      async function loadMermaid() {
        await mermaid.registerExternalDiagrams([mindmap]);
        mermaid.initialize(conf);
      }

      await loadMermaid();
    </script>

Can we add a config to make it insert above script when needed ? I can try to make a PR if you think it is worth adding.

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