pkcpkc26 downloadsAdds an Edit in mermaid.live link beneath Mermaid diagrams and styles them for sizing and clean PDF export.
An Obsidian plugin that adds an Edit in mermaid.live ↗ link beneath every Mermaid diagram, in both Live Preview and Reading view. One click opens the diagram in the Mermaid Live Editor with its code preloaded.

It also ships styles that keep diagrams at a sensible width and make them print cleanly:
main.js, manifest.json and styles.css from the latest release.<your vault>/.obsidian/plugins/mermaid-live-link/.Add this repository in the BRAT plugin.
Write a Mermaid code block as usual:
```mermaid
graph TD
A --> B
```
The link appears below the rendered diagram, including diagrams inside callouts, lists and embedded notes. The diagram opens in mermaid.live with the dark theme when Obsidian uses a dark theme.
The plugin makes no network requests. The diagram code is encoded into the link's URL and is only sent to mermaid.live if you click the link. This is why the code uses btoa (base64 encoding): it is the URL format mermaid.live expects.
There is no build step: main.js is plain JavaScript. To try changes, symlink or copy this folder into <vault>/.obsidian/plugins/mermaid-live-link/ and reload the plugin.
npm version patch # or minor / major; updates manifest.json and versions.json
git push --follow-tags
Pushing the tag triggers the GitHub Action, which publishes a release with main.js, manifest.json and styles.css attached, along with GitHub artifact attestations for them. The tag must equal the version in manifest.json (no leading v).