Created
November 27, 2024 12:17
-
-
Save Magnus167/1c34fa5ccd3dfd7fec47aea74821fa46 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Mermaid Chart with ELK Layout</title> | |
</head> | |
<body> | |
<div class="mermaid"> | |
graph TD | |
A[Start] --> B{Is it working?} | |
B -->|Yes| C[Great!] | |
B -->|No| D[Try Again] | |
</div> | |
<script type="module"> | |
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs'; | |
import elkLayouts from 'https://cdn.jsdelivr.net/npm/@mermaid-js/layout-elk@11/dist/mermaid-layout-elk.esm.min.mjs'; | |
mermaid.registerLayoutLoaders(elkLayouts); | |
mermaid.initialize({ | |
startOnLoad: true, | |
layout: 'elk', | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment