Mermaid Preview ExporterEnglish | 简体中文 Export Mermaid diagrams directly from VS Code's native Markdown preview—without replacing the built-in preview experience.
DemoOpen VS Code's native Markdown preview, hover a rendered Mermaid diagram, then choose a visual preset or export action from the floating toolbar:
The image below is a real complex-flowchart PNG exported by the extension using the Blue preset. It demonstrates subgraphs, decision nodes, loops, connectors, arrowheads, and mixed Chinese/English labels.
For editable PPTX export, the same flowchart structure is recreated as native PowerPoint/WPS shapes, text boxes, and connectors instead of being embedded as one picture. FeaturesHover any rendered Mermaid diagram in Markdown: Open Preview to access:
The selected visual preset is applied to both the preview and exported files. Requirements
Usage
Try this example:
The export toolbar appears when the pointer is over the rendered diagram. Theme changes are previewed immediately and are also applied to the exported file. SVG and PNG exports inline the computed diagram styles and remove embedded HTML, scripts, external links, and residual stylesheets. This avoids common browser rasterization failures and Office's “content has been disabled” warning. Editable PPTX scopeEditable PPTX export currently supports Mermaid flowcharts. Nodes, labels, straight connectors, dash styles, and arrowheads are exported as native Office objects and remain editable in Microsoft PowerPoint and WPS Presentation. Curved Mermaid edges are represented as editable straight connectors between the same endpoints. Other Mermaid diagram families can still be exported as SVG or PNG. PrivacyThe extension processes diagrams locally. It contains no telemetry and does not send Markdown or diagram content to external services. Development
Install the generated VSIX and reload VS Code to test the extension. License |
