Advertisement
guitarplayer616

Mermaid Injection

Apr 13th, 2024
981
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Mermaid injection google chrome console
  2.  
  3. // run to render below into mermaid graph
  4. let script = document.createElement("script");
  5. script.type = 'module';
  6. script.textContent = `import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.esm.min.mjs';
  7. mermaid.run();`
  8. document.body.appendChild(script);
  9.  
  10. // type into <body>
  11. <pre class="mermaid">sequenceDiagram
  12.     Mower -&gt;&gt; Lawn: create()
  13.     Lawn -&gt;&gt; Mower: Mower mower
  14.     Mower -&gt;&gt; Grass: cut()
  15.     Mower -&gt;&gt; Scanner: scan()
  16. </pre>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement