fix: Add layout-elk in example.html

This commit is contained in:
Sidharth Vinod 2024-11-27 15:05:40 +05:30
parent 193fdb225e
commit 4e17da0a30
No known key found for this signature in database
GPG Key ID: FB5CCD378D3907CD

View File

@ -39,6 +39,8 @@ graph TB
<script type="module">
import mermaid from '/mermaid.esm.mjs';
import layouts from '/mermaid-layout-elk.esm.mjs';
mermaid.registerLayoutLoaders(layouts);
async function render(str) {
const { svg } = await mermaid.render('dynamic', str);
document.getElementById('dynamicDiagram').innerHTML = svg;