When pasting content into Confluence that includes fenced Mermaid code blocks, they should automatically render as diagrams. Currently there's no way to get Mermaid diagrams into a page without manually inserting the macro through the editor UI. This means tools like AI code assistants that generate documentation with inline Mermaid syntax can't produce ready-to-go Confluence content — every diagram requires manual intervention after pasting.
Mermaid actually has a Confluence (and Jira) application you can install from the marketplace that helps you add Mermaid diagrams to pages and work items.
If you need help their support is fantastic also.
Make sure you only download the app that is made by Mermaid, there are several out there, but use the official Mermaid ones.
Hi @Shelley Emma Criveano
Welcome to the community !!
That certainly is a a limitation as Confluence cannot recognize different types of diagramming code. There is PlantUML as well and few more.
I understand that you may already have a Mermaid Diagram tool on your Confluence instance.
If you would still like to explore an alternative, do try out
Mermaid Diagrams for Confluence
The app has more than 15 diagramming templates Do give it a try.
Disclaimer : I am part of the app dev team
Confluence has no built-in way to auto-detect fenced Mermaid and render it on paste. Every diagramming format still needs its macro inserted manually in the editor.
For AI-generated content, our app Just Add+ renders Mermaid from inline text, a page attachment, or a raw GitHub or GitLab URL.
You paste the Mermaid block straight into the Diagram macro and it renders, no rebuild step.
Feel free to reach out if you'd like to learn more.
There's a structural reason this doesn't work today: the paste pipeline converts a fixed set of patterns (links, tables, lists...) but diagrams in Confluence are macros in the page's storage format — and there's no hook that recognizes ```mermaid fences on paste and inserts a macro for you. That's why every diagram needs a manual step somewhere.
Two ways to close that gap, depending on how AI-generated content flows into your pages:
Full Markdown documents (the typical AI-assistant output with ```mermaid blocks inline): the Enhanced Markdown for Confluence macro gives you a Markdown editor with a live split preview that renders Mermaid and ZenUML fences as diagrams. Paste the whole document or upload the .md file — fenced diagrams render with everything else, so "AI output → Confluence page" becomes one paste instead of one rebuild per diagram.
Individual diagrams on an otherwise-native page: type /mermaid and use Mermaid Plus for Confluence — paste your code straight in, watch the live preview while you edit, 29 diagram types. The macro step still exists, but the code goes from your AI tool into the editor without reformatting.
/mermaid
— Simon from NGPILOT
Shelley, the replies above cover the in-editor route well, but each diagram still goes through a macro. If the Markdown your AI tools produce ends up committed to a git repository anyway, there's a route with no paste step at all.
Disclosure: I'm the developer of RepoPages, a Confluence Cloud app on the Marketplace. The repository is the source: on each push, your CI sends the changed Markdown files, and the app creates or updates real Confluence pages. ```mermaid and ```plantuml fences are rendered to SVG diagrams during that CI step, and the diagram source is kept on the page so it stays searchable.
```mermaid
```plantuml
It's a different workflow from pasting into the editor, so it only fits if your docs already live in git. If they do, I'm happy to help you set it up.
Hi Shelley, one free route that hasn’t come up here yet, plus where each option stops.
As others said, nothing in Confluence turns a ```mermaid fence into a diagram when you paste it. You get an ordinary code block. Atlassian Labs’ free Mermaid diagrams viewer works with exactly that: leave the pasted code block on the page, add the viewer’s macro, and it draws the diagram from the code block. The AI’s output stays on the page as it was written. https://marketplace.atlassian.com/apps/1232887/mermaid-diagrams-viewer
It’s still one manual step per diagram, and you edit the Mermaid as plain code. I don’t know of any app that skips that step on paste. Disclosure: I make Mermaid & PlantUML Diagrams for Confluence. It doesn’t convert on paste either, but it takes the paste as it comes: type /mermaid and paste the whole AI answer. If it holds one mermaid block, the editor keeps just the diagram (Undo puts your paste back), and the preview draws as you type. https://marketplace.atlassian.com/apps/2223387997/mermaid-plantuml-diagrams-for-confluence
It looks like you're new here. Sign in or register to get started.