Installed plugin: https://marketplace.atlassian.com/apps/1232887/mermaid-diagrams-viewer
Insert markdown text with embedded mermaid code with extended copy
Copy the code as markdown
Expected: Add the mermaid code as a code block and then render the mermaid code.
Got:
Hey @Andreas Walden ,
I've only seen this app once, but haven't tested it. You could check their official docs or use Atlassian Labs (GitHub) official support channel
Now, have you maybe tried using the following command/macro
/mermaid
This might open/display something like "Mermaid Diagrams for Confluence" 👀
Cheers,Tobi
Hi Tobi,
thanks for the answer. Yes, the /mermaid works if I edit it directly in confluence. But how should I add this command inside the markdown text?
The mermaid plugin works perfect. Also the markdown import. But they do not work together.
I will try the support channel.
Regards,
Andreas
@Andreas Walden I'm OOO, but I could play around with this next week and see how it actually works.
But if you find the answer in the meantime, I would appreciate it if you could share it here 👀
Hi Simon,
thanks for the info, I will check it out
This is a real gap — Confluence's markdown import and the code-block macro are separate systems that don't talk to each other, so ```mermaid blocks land as plain syntax-highlighted code with no rendering.
Current practical options: (a) paste the mermaid source into a dedicated mermaid macro app manually, or (b) use an app that auto-detects mermaid code blocks on the page.
Full disclosure: we're building a Forge-native mermaid app (free beta: https://mermaidpro.app/install) and markdown-paste detection is on our shortlist — if this is a daily workflow for you, I'd genuinely love to hear the details. It would directly shape how we build it.
Updated answer below 👇
@Andreas Walden The gap is that /mermaid only works when you insert a diagram by hand, and there's no way to put that macro inside Markdown. So after the import, every Mermaid section stays a plain code block.
This gap is one of the reasons we built Visual Mermaid. With it, you keep importing your Markdown as you do now, and one action on the page turns all the Mermaid code blocks into rendered diagrams at once. You can then keep editing each one as code or by clicking on the diagram.
THIS IS THE ACTUAL FIX AND THE WAY TO GO
thanks for this extension @Simon_NGPILOT_ , your extension deserves far more popularity and every penny it costs.
edit : haven't tested @schneiderman tech extension, you might want to try it too.
Confluence Cloud turns pasted mermaid code blocks into plain code blocks, so the diagram won't render by itself. Without a paid app, Atlassian Labs' free Mermaid diagrams viewer (the one you installed) can draw a code block that is already on the page, one block at a time.
Full disclosure: we make Mermaid Text Diagrams for Confluence & Jira (BrightDesk Apps). Its Text Diagram (Mermaid) macro takes Mermaid text, or even a whole ChatGPT or Claude answer, finds the mermaid block inside it and draws it with a live preview, zoom, Fit, full screen and SVG or PNG download. Honest limit: it does not convert existing code blocks on a page automatically; each diagram goes in its own macro. Guides: https://brightdeskapps.com/help
@avega thanks for the mention! Since this week, "Render all Mermaid code blocks" (page menu → Apps) converts every Mermaid code block already on a page into a rendered diagram in one step, including pages created by Markdown import. Free for up to 10 users.
Update (full disclosure: I'm with BrightDesk Apps, maker of Mermaid Text Diagrams for Confluence & Jira). My earlier reply said our app could not convert code blocks already on a page. It can now: open the published page, then the page menu (…) > Apps > Render all Mermaid code blocks. It lists the Mermaid code blocks on the page, including ones inside tables and expands. Tick the ones you want and each becomes an editable diagram in the same place; other code blocks are left alone, and Page history keeps the previous version. Free for up to 10 users. Guide: https://brightdeskapps.com/help/mermaid-code-blocks-confluence
Hi Andreas,
As everyone mentioned, this use case needs 2 separate solutions, one more markdown and the other one for rendering mermaid diagrams.
If you would be interested to try out mktplace apps for the same, do take a look at the ones which we have developed.
Markdown Exporter & Editor for Confluence - This helps you write and edit markdown easily in Confluence
Mermaid Diagrams - With this app you can turn mermaid code text into diagrams, right in Confluence
Do try out the apps.
Disclaimer - I am part of the app dev team
Thanks
Adding a data point from the Markdown side of this, with the limit stated first: a Markdown macro and a Mermaid renderer are two different jobs, and conflating them is how this workflow keeps breaking.
Full disclosure: I build MarkDown Live (Sentrada Labs), a Forge macro that renders Markdown on a Confluence page. You paste your Markdown into its editor, there is a live preview, and tables, task lists, highlighted code and heading anchors render on the page. If your document already lives as a file, you can attach the .md file to the page and point the macro at it, and it re-reads the attachment on every view, so updating the file updates the page.
Here is the honest limit, and it matters for this thread: MarkDown Live does not render Mermaid. A mermaid fence shows as code, deliberately for now. So it does not solve the diagram half of your problem, and I would not suggest it as if it did. The workflow that works today is the split one the later replies here landed on: render the prose, tables and code through a Markdown route, and give each diagram its own dedicated Mermaid macro, or use a page level action that converts existing Mermaid code blocks after import.
One more question worth asking of any Markdown macro you evaluate, whichever vendor: does it pass raw HTML through? A renderer that does is a stored cross site scripting hole with extra steps. MarkDown Live uses its own parser with no HTML passthrough at all, tags in the source display as text, and links only go out with http, https or mailto destinations. Ask the same of any alternative you pick, including for the Mermaid side.
Tyler, Sentrada Labs
It looks like you're new here. Sign in or register to get started.