Release pipeline
Every commit follows the same path before it reaches production.
Figure 1: Release pipeline
The diagram above is inserted as a scalable image with a caption.
Fenced mermaid blocks are rendered to crisp vector diagrams and embedded in the .docx, sized to the page. No screenshots, no blurry PNG exports.
Release pipeline
Every commit follows the same path before it reaches production.
Figure 1: Release pipeline
The diagram above is inserted as a scalable image with a caption.
Any fenced block tagged mermaid is detected: flowcharts, sequence, class, state, ER, Gantt, pie and more.
The preview draws the diagram at the width it will have on the page, so you can spot overflow before downloading.
Diagrams are embedded as SVG for sharp output in current desktop versions of Word.
Word has no idea what Mermaid is. If you paste Markdown containing a ```mermaid block into Word, you get the source text in a monospace font, which is exactly what most online converters also produce. The only way a diagram can exist inside a .docx is as an image, so the real question is what kind of image, how big, and where.
MDtoDOCX runs the Mermaid renderer in your browser, the same library that draws diagrams on GitHub and in Obsidian. The output is an SVG: a set of paths, rectangles and text nodes rather than pixels. That SVG is written into word/media/ inside the .docx, referenced from a drawing element in the document, and rendered by Word as a vector graphic. Since Office 2016 and in every Word 365 build, Word draws SVG natively through the asvg:svgBlip extension, so lines stay sharp when you zoom to 400% or print on a large-format plotter.
The current exporter targets desktop versions of Word that support SVG. Older Word releases and some third-party or mobile viewers may not display the diagram correctly, so check the final file in the application your reader will use. A full-resolution raster fallback is still on the product roadmap.
The rendered diagram carries its natural width and height. We scale it to fit the printable width of the page you chose, which is the paper width minus the margins, and never scale it up beyond its natural size, because a small pie chart stretched to full width looks amateurish. The image sits in its own centred paragraph. Add title="Release pipeline" or caption="Release pipeline" after the opening Mermaid fence to place that text in a Word Caption-styled paragraph below the image.
Flowchart, sequence diagram, class diagram, state diagram, entity relationship, user journey, Gantt, pie, quadrant, requirement, gitGraph, mindmap and timeline all render. The renderer uses Mermaid's neutral theme with the diagram font set to match your body font choice, so a Calibri document does not suddenly contain a diagram in a web font. A syntax error in the diagram is shown in the preview at the exact block, and the block is exported as a highlighted code paragraph rather than failing the whole conversion.
Be clear about the trade-off: the diagram in Word is a picture. You can move, resize, crop and wrap text around it, but you cannot drag a node to a new position. Keep the Mermaid source in your Markdown and re-export when it changes. On request we also write the source into the image's alt text, so a reviewer using a screen reader hears the structure and you can recover the source from the .docx alone.
Diagrams are rendered as vector images embedded in the document. Free users get the rendered preview and a download in which the Mermaid block appears as a code paragraph; Pro unlocks the embedded diagrams. The identical renderer powers Markdown to PDF with Mermaid. Documents that mix diagrams with math benefit from the LaTeX to Word equations path, and pipe tables next to your diagram come through as real Word tables.
| Diagram handling | MDtoDOCX | Pandoc | Copy into Word |
|---|---|---|---|
| Mermaid block becomes | Embedded SVG | Code block, unless a filter is installed | Plain text |
| Setup | None | Node.js, mermaid-filter, headless Chrome | None |
| Resolution | Vector, sharp at any zoom | PNG at fixed DPI | n/a |
| Fits the page width | Yes, automatic | Often oversized, needs manual resize | n/a |
| Caption | From the fence title or caption metadata | Manual or pandoc-crossref | Manual |
| Preview before export | Yes | No | n/a |
| Syntax error handling | Highlighted in preview, block kept as code | Filter aborts conversion | n/a |