DONE? Mermaid in Preview for HTML and MD

Make a request or discuss new features.
Post Reply
ScrKiddle
Posts: 39
Joined: 05 Aug 2026 03:15

DONE? Mermaid in Preview for HTML and MD

Post by ScrKiddle »

If the Side-View for HTML and MD would understand Mermaid https://mermaid.js.org/ diagrams, it would be very cool.
Modern Web-Browsers and many Markdown-Editors do support this.
8)

Example:

Code: Select all

---
config:
  layout: elk
---
flowchart TB
  F["1. Flowchart"]
  S["2. Sequence diagram"]
  ST["3. State diagram"]
  C["4. Class diagram"]
  ER["5. Entity relationship diagram"]
  G["6. Gantt chart"]
  GG["7. Git graph"]
  P["8. Pie chart"]
  T["9. Timeline"]
  U["10. User journey"]
  M["11. Mindmap"]
  Q["12. Quadrant chart"]
  XY["13. XY chart"]
  R["14. Requirement diagram"]
  C4["15. C4 diagram"]
  A["16. Architecture diagram"]
  B["17. Block diagram"]
  K["18. Kanban"]
  PK["19. Packet diagram"]
  SK["20. Sankey diagram"]

  F --> S --> ST --> C --> ER --> G --> GG --> P --> T --> U --> M --> Q --> XY --> R --> C4 --> A --> B --> K --> PK --> SK

  classDef indigo fill:#eef2ff,stroke:#818cf8,color:#111827
  classDef teal fill:#f0fdfa,stroke:#2dd4bf,color:#111827
  classDef violet fill:#f5f3ff,stroke:#a78bfa,color:#111827
  classDef orange fill:#fff7ed,stroke:#fb923c,color:#111827
  classDef green fill:#f0fdf4,stroke:#4ade80,color:#111827

  class F,S,ST,C indigo
  class ER,G,GG,P teal
  class T,U,M,Q violet
  class XY,R,C4,A orange
  class B,K,PK,SK green
  
User avatar
Rickard Johansson
Site Admin
Posts: 6973
Joined: 19 Jul 2006 14:29

Re: [Request] Mermaid in Preview for HTML and MD

Post by Rickard Johansson »

Done!

The syntax file is very basic and doesn't highlight much...

mermaid.png
mermaid.png (17.93 KiB) Viewed 199 times
mermaid2.png
mermaid2.png (58.19 KiB) Viewed 199 times
ScrKiddle
Posts: 39
Joined: 05 Aug 2026 03:15

Re: DONE? Mermaid in Preview for HTML and MD

Post by ScrKiddle »

The preview looks awesome :-D
We are all waiting for the new beta 8) :lol:
User avatar
Rickard Johansson
Site Admin
Posts: 6973
Joined: 19 Jul 2006 14:29

Re: DONE? Mermaid in Preview for HTML and MD

Post by Rickard Johansson »

ScrKiddle
Posts: 39
Joined: 05 Aug 2026 03:15

Re: DONE? Mermaid in Preview for HTML and MD

Post by ScrKiddle »

Ohh lala ... :-D

When i open a Markdown-File *.md with Mermaid, then the preview shows the code without the opening ```mermaid and block-closing ```

But when i open Mermaid in a HTML-File it looks perfect even with color and fancy classDef-Styles :-D :-D

If this what i see in a HTML-Preview also appears in the MD--Preview, ... skyrocket step forward :-D
User avatar
Rickard Johansson
Site Admin
Posts: 6973
Joined: 19 Jul 2006 14:29

Re: DONE? Mermaid in Preview for HTML and MD

Post by Rickard Johansson »

Seems to be working now... 8)

mermain_in_code_block.png
mermain_in_code_block.png (21.43 KiB) Viewed 116 times
ScrKiddle
Posts: 39
Joined: 05 Aug 2026 03:15

Re: DONE? Mermaid in Preview for HTML and MD

Post by ScrKiddle »

Works like perfectly in HTML.

But in 16.66 Beta 7 on Windows, in Markdown/MD ... some how.. it looks like the following:
Mermaid_in_Markdown_MD_at_Beta_7.png
Mermaid_in_Markdown_MD_at_Beta_7.png (33.55 KiB) Viewed 38 times
:?

I did try the explorer and the edge side-view- and preview-mode.
Post Reply