# Mermaid export demo
This repository includes a runnable playground demo that shows how to intercept the export event from `MermaidBlockNode` and upload the serialized SVG (ev.svgString).
- Playground route: `/mermaid-export-demo`
- File: `playground/src/pages/mermaid-export-demo.vue`
Why use this demo?
- Demonstrates how to use `setCustomComponents` to override the mermaid renderer inside `MarkdownRender`.
- Shows how to intercept `export` and use `ev.svgString` (or `ev.svgElement`) to upload or send the SVG to an API.
Try it: run the playground and visit the route `/mermaid-export-demo`.
Try it locally — runnable example
You can copy the following single-file component into your app or into the playground to try the export handler immediately. It demonstrates a minimal `setCustomComponents` override that intercepts the `export` event and posts the serialized SVG string to a (fake) API.
```vue
pnpm play and visit /mermaid-export-demo