mermaid/cypress/platform/render-after-error.html

28 lines
827 B
HTML
Raw Normal View History

2024-03-23 07:09:02 +01:00
<!doctype html>
<html>
2022-09-04 21:30:47 +02:00
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>Mermaid Quick Test Page</title>
<link rel="icon" type="image/png" href="data:image/png;base64,iVBORw0KGgo=" />
</head>
<body>
<div id="graph"></div>
2023-02-19 09:33:11 +01:00
<script type="module">
import mermaid from './mermaid.esm.mjs';
await mermaid.initialize({ startOnLoad: false });
await mermaid.run();
2022-01-22 12:36:18 +01:00
2023-02-19 09:33:11 +01:00
await mermaid.mermaidAPI.initialize({ securityLevel: 'strict' });
2022-11-10 09:21:53 +01:00
try {
console.log('rendering');
2023-02-19 09:33:11 +01:00
await mermaid.mermaidAPI.render('graphDiv', `>`);
2022-11-10 09:21:53 +01:00
} catch (e) {}
2023-02-19 09:33:11 +01:00
const { svg } = await mermaid.mermaidAPI.render('graphDiv', `graph LR\n a --> b`);
document.getElementById('graph').innerHTML = svg;
2022-09-04 21:30:47 +02:00
</script>
</body>
</html>