884 B30 lines
Blame
1<html>
2 <script>
3 // %%{ init: { "logLevel":0, "themeVariables" : { "primaryColor": "#fff000","textColor": "green","apa":"} #target { background-color: crimson }" } } }%%
4 </script>
5 <body>
6 <div id="target">
7 <h1>This element does not belong to the SVG but we can style it</h1>
8 </div>
9 <svg id="diagram"></svg>
10
11 <script type="module">
12 import mermaid from './mermaid.esm.mjs';
13 mermaid.initialize({ startOnLoad: false, logLevel: 0 });
14
15 const graph = `
16 %%{ init: { "fontFamily" : "&125; * { background: red }" } }%%
17 graph TD
18 A[Goose]
19 `;
20
21 const diagram = document.getElementById('diagram');
22 const { svg } = await mermaid.render('diagram-svg', graph);
23 diagram.innerHTML = svg;
24 if (window.Cypress) {
25 window.rendered = true;
26 }
27 </script>
28 </body>
29</html>
30