827 B28 lines
Blame
1<!doctype html>
2<html>
3 <head>
4 <meta charset="utf-8" />
5 <meta http-equiv="X-UA-Compatible" content="IE=edge" />
6 <title>Mermaid Quick Test Page</title>
7 <link rel="icon" type="image/png" href="data:image/png;base64,iVBORw0KGgo=" />
8 </head>
9 <body>
10 <div id="graph"></div>
11
12 <script type="module">
13 import mermaid from './mermaid.esm.mjs';
14 await mermaid.initialize({ startOnLoad: false });
15 await mermaid.run();
16
17 await mermaid.mermaidAPI.initialize({ securityLevel: 'strict' });
18 try {
19 console.log('rendering');
20 await mermaid.mermaidAPI.render('graphDiv', `>`);
21 } catch (e) {}
22
23 const { svg } = await mermaid.mermaidAPI.render('graphDiv', `graph LR\n a --> b`);
24 document.getElementById('graph').innerHTML = svg;
25 </script>
26 </body>
27</html>
28