2022-11-10 13:51:53 +05:30
|
|
|
<html>
|
|
|
|
<body>
|
|
|
|
<h1>Should correctly load a third-party diagram using registerDiagram</h1>
|
|
|
|
<pre id="diagram" class="mermaid">
|
2023-02-08 17:42:58 +01:00
|
|
|
example-diagram
|
2022-11-10 13:51:53 +05:30
|
|
|
</pre>
|
|
|
|
|
|
|
|
<!-- <div id="cy"></div> -->
|
|
|
|
<!-- <script src="http://localhost:9000/packages/mermaid-mindmap/dist/mermaid-mindmap-detector.js"></script> -->
|
|
|
|
<!-- <script src="./mermaid-example-diagram-detector.js"></script> -->
|
|
|
|
<!-- <script src="//cdn.jsdelivr.net/npm/mermaid@9.1.7/dist/mermaid.min.js"></script> -->
|
|
|
|
<!-- <script type="module" src="./external-diagrams-mindmap.mjs" /> -->
|
|
|
|
<script type="module">
|
2023-03-17 20:53:13 +01:00
|
|
|
import exampleDiagram from '../../packages/mermaid-example-diagram/dist/mermaid-example-diagram.core.mjs';
|
2022-11-10 13:51:53 +05:30
|
|
|
// import example from '../../packages/mermaid-example-diagram/src/detector';
|
2023-03-20 12:21:22 +01:00
|
|
|
import mermaid from './mermaid.esm.mjs';
|
2022-11-10 13:51:53 +05:30
|
|
|
|
2023-02-08 17:42:58 +01:00
|
|
|
await mermaid.registerExternalDiagrams([exampleDiagram]);
|
2022-11-10 13:51:53 +05:30
|
|
|
await mermaid.initialize({ logLevel: 0 });
|
2023-02-19 16:10:08 +05:30
|
|
|
await mermaid.run();
|
2023-01-16 13:18:16 +05:30
|
|
|
if (window.Cypress) {
|
|
|
|
window.rendered = true;
|
|
|
|
}
|
2022-11-10 13:51:53 +05:30
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|