Using mermaid code to create Diagrams

I did this before.

I have a template column to put my Mermaid code inside a “HTML structure”.

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8" />
</head>
<body>

    <pre class="mermaid">
{G}
   </pre>

    <pre class="mermaid">
{M}
   </pre>
<script type="module">
  import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs';
</script>
</body>
</html>

{G} and {M} here are the content of my Gantt and Mermaid charts.

Then, I pass the result of that to a “HTML to URL” column and display it with web embed.

4 Likes