Huseyn K. Najafli23 downloadsReadable Mermaid cards with resize handles, saved sizes, and a pan-and-zoom viewer.
Natural-sized Mermaid previews, corner resizing, remembered diagram dimensions, and a compact pan-and-zoom viewer for Obsidian 1.15+.
Created and maintained by Huseyn Najafli.
Includes viewer components adapted from Better Mermaid 1.0.8 by Joven Lynn under the MIT license. See Credits and license and NOTICE.md.
Until Community directory acceptance, install manually:
main.js, manifest.json, and styles.css from Releases.<vault>/.obsidian/plugins/mermaid-cards/.mermaid, better-mermaid-zoom, and mermaid-native, if active).Keep the old Better Mermaid folder until the first import completes. Mermaid Cards reads the old preferences without modifying that file, then stores its own preferences in its own data.json.
The viewer retains Better Mermaid's controls: scroll to pan, Shift+scroll for horizontal pan, Ctrl+scroll to zoom, drag to move, zoom presets, Fit, and PNG export.
.obsidian/plugins/mermaid-cards/data.json; this file may contain note paths and must not be committed publicly.main.js is readable CommonJS source and the runtime entry point. No compilation is required for installation. Node.js 24 and pnpm 11.25.0 are used for tests and release checks.
pnpm install --frozen-lockfile
pnpm exec playwright install chromium
pnpm run verify
pnpm run check
pnpm test
Tests exercise real browser layout and mouse resizing with a modeled Obsidian API. They cover natural/fixed modes, persistence, imports, rename handling, viewer dimensions, cleanup, and PNG pixel colors. These tests do not replace real-device or Obsidian directory review.
After this repository is public, open Actions → Publish release → Run workflow on main. The workflow validates versions, runs tests, creates a draft release with all three runtime attachments, then publishes it. The tag is exactly the manifest version (0.1.2), without a v prefix. It refuses to overwrite an existing release.
Publishing a GitHub release does not list the plugin in Obsidian automatically. Follow Community submission instructions, including the upstream permission requirement.
Upstream contributor: Joven Lynn, author of Better Mermaid. Mermaid Cards adds natural/resizable previews, persistent dimensions, Pele compatibility fixes, export color preservation, integrated appearance, and pixel-based settings.
Maintainer: Huseyn Najafli.