Do I have to strip the code block out of the AI reply?

About 2 min · Updated 2026-09-13

No. Paste the entire reply — explanation text, a fence without a language tag, or bare code with no fence at all. The Mermaid inside gets detected and rendered. Most online renderers make you do this by hand.

Short answer

No. Paste the whole thing into the code pane of the editor. The prose before and after is ignored and the Mermaid inside is rendered.

What it handles

Assistants format their "copy" output differently, and all of these work:

  • A fenced block tagged mermaid — the standard case.
  • A fence with the language tag missing. Some assistants drop the tag when the reply also contains explanation text; the first keyword (flowchart, sequenceDiagram, mindmap, …) is enough to recognise it.
  • Bare code with no fence, with the explanation running straight on after it.
  • Several diagrams in one reply. The first one renders; the rest stay in the code pane, so deleting the block above shows you the next.

The status line under the code pane reports what was found, so you can tell a miss from a hit immediately.

Nothing to paste yet?

Start from this:

sequenceDiagram
    participant User
    participant Web
    participant API
    User->>Web: Submit form
    Web->>API: POST /orders
    API-->>Web: 201 Created
    Web-->>User: Order confirmed
Open in the editorEdit the text, switch themes and download PNG, Word or PowerPoint from there.

Try it in the editor

More guides

All guidesLooking for a specific answer? Try the Help Center