Merlay

by Ali Hashemi
5
4
3
2
1
Score: 51/100

Description

Structural visual editor for Mermaid — sprout, connect & edit visually, 100% clean portable code.

Reviews

No reviews yet.

Stats

9
stars
678
downloads
0
forks
23
days
3
days
4
days
1
total PRs
0
open PRs
0
closed PRs
1
merged PRs
3
total issues
0
open issues
3
closed issues
158
commits

Latest Version

4 days ago

Changelog

Merlay 0.6.0 — Flowchart shapes, diagram notes, sequence frames, and classDef styling

Mermaid, your way. A visual overlay editor for Mermaid diagrams.

🎉 Major New Features (both hosts)

  • Comprehensive Flowchart Shapes & Searchable Picker — Full support for all Mermaid flowchart shapes including v11.3+ modern geometries (stadium, cylindrical database, subroutine, hexagon, trapezoid, double circle, asymmetric flag, notch rect, hourglass, tag, bolb, etc.), categorized and instantly searchable in the node shape picker.
  • Built-in Icon & Image Node Shapes — Create and configure @ { icon: "..." } and @ { img: "..." } flowchart shapes with a bundled 19-glyph built-in merlay:* icon pack that renders natively across all runtimes without external CDN dependencies.
  • Diagram Notes (Sequence, State, Class) — First-class visual editing for notes. Click any note on the canvas to inspect or edit its text, change placement (left, right, over), or delete notes with single-click removal.
  • Sequence Diagram Control Frames — Interactive frames for loop, opt, alt, par, critical, break, and rect blocks. Select frames, rename conditions, and dissolve or delete frames with full backwards compatibility across both Mermaid 10 (native Obsidian) and Mermaid 11.
  • Flowchart Node-to-Subgraph Connections — Drag-and-connect directly between nodes and subgraph boundaries (node-to-subgraph, subgraph-to-node, and subgraph-to-subgraph) with live boundary drop targets and real-time Dagre layout conflict feedback.
  • ClassDef Palette & Reusable Styling — Define and manage reusable CSS styles (classDef) for flowchart diagrams. Assign classes to nodes via visual class badges.
  • State Diagram Concurrency Dividers — Split composite states into parallel concurrent execution tracks (--) with dedicated Action HUD controls.
  • Extended Arrowheads & Diagram Accessibility — Added open, dotted-open, and cross arrow styles for flowcharts, plus diagram-level title, accessible title (accTitle), and accessible description (accDescr) editing via the canvas info popover.
  • Node Hyperlinks & Autonumber — Add external URLs or vault links to nodes (click / link statements) and toggle sequence diagram autonumbering directly from the toolbar.

🔧 Fixes & Polish

  • Sequence Frame Selection: Frame hit areas now reliably capture clicks across frame borders, header tabs (polygon.labelBox), multi-word titles, and interior regions.
  • Note Targeting: Direct note clicking now matches against AST note text for 100% accurate note association even on complex sequence timelines.
  • Direction Conflict Feedback: Subgraph direction conflict warnings are embedded directly into the flow toggle button with high-contrast, readable status pills.
  • Title Persistence: Diagram title updates save atomically to frontmatter, preventing unintended clears.

Install (Obsidian)

BRAT (Beta): Add https://github.com/dev-hashemi/merlay in BRAT → Add Beta plugin.

Manual: Download main.js, manifest.json, and styles.css from the assets below into your vault under .obsidian/plugins/merlay/, then enable Merlay under Settings → Community plugins.

Requires Obsidian 1.4.0 or newer. Desktop and mobile supported.

Install (VS Code)

Install from the VS Code Marketplace or Open VSX, or grab the .vsix attached below → Extensions → … → Install from VSIX.

Full Changelog: https://github.com/dev-hashemi/merlay/compare/0.5.1...0.6.0

What's Changed

New Contributors

Full Changelog: https://github.com/dev-hashemi/merlay/compare/0.5.1...0.6.0

README file from

Github

Merlay

Mermaid, your way.
A visual overlay editor for Mermaid diagrams in Obsidian.

GitHub release Obsidian VS Code Marketplace Open VSX License: MIT CI

Merlay lets you create and edit Mermaid diagrams visually directly inside your Obsidian notes. Build Flowcharts, State Diagrams, Sequence Diagrams, and Mindmaps with single-click relational sprouting, drag-and-drop connections, and inline renaming — without writing code or fighting diagram syntax.

Everything you create is saved as 100% standard, clean Mermaid syntax right inside your note. No proprietary lock-in, no layout drift, and fully compatible with Obsidian mobile, GitHub, and AI assistants.

Merlay is also available for VS Code and its forks (Devin, Cursor, VSCodium) on the VS Code Marketplace and Open VSX — same visual editor, same core.


📊 Supported Diagrams

Merlay provides interactive visual editing for 4 major Mermaid diagram types:

  • Flowcharts (flowchart, graph)
  • State Diagrams (stateDiagram-v2)
  • Sequence Diagrams (sequenceDiagram)
  • Mindmaps (mindmap)

All other diagram types open in a high-performance view mode with smooth pan and zoom.


✨ Features

  • 🎯 Visual-First Editing: Click to select, sprout connected elements in one click, drag handles to connect, and double-click to edit text inline.
  • 🎨 Universal Themes: Switch between Default, Dark, Neutral, Forest, and Base themes across all diagrams using standard Mermaid frontmatter.
  • 🔄 Two-Way Sync: Changes reflect instantly in your note, with a slide-out drawer to view and tweak Mermaid source code live.
  • ⚡ Native Obsidian Flow: Hover over any Mermaid block in Reading View or Live Preview and click Visual Mode, or insert templates via slash commands (/flowchart, /state, etc.).
  • 📂 Standalone Files: Create and edit .mmd and .mermaid diagram files directly from the file explorer.
  • 🔒 Zero Lock-In: Generates clean, human-readable Mermaid code with no custom comments or hidden layout data.

⚡ Quick Start

  1. Open: Hover over any Mermaid block in your note and click Visual Mode (or type /flowchart, /state, /sequence, or /mindmap).
  2. Edit: Sprout new items, drag connections, double-click to rename, or delete elements.
  3. Save: Close the overlay — your note is updated automatically in real time.

⌨️ Controls

Action Shortcut / Gesture
Select Click element
Sprout Child Click + handle on selected element
Connect Drag from handle to target element
Edit Text Double-Click element or connection label
Delete Delete or Backspace
Pan Click + Drag canvas background (or hold Space)
Zoom Mouse Wheel or pinch trackpad
Toggle Syntax Drawer Click <> Syntax button

💡 Why Merlay? (Structural, Not Spatial)

Mermaid is a declarative, code-first diagramming language that computes its own layout. Traditional visual editors often attempt to impose arbitrary spatial coordinates onto diagrams, leading to broken round-trips, syntax corruption, and layout drift.

Merlay takes a structural approach:

  • 1:1 Native Parity: Controls are overlaid directly on Obsidian's exact Mermaid SVG rendering — what you see is what you get.
  • Topological Operations: You edit structure and relationships (elements and connections), while Mermaid computes clean, natural layouts automatically.
  • Ultra-Lean Footprint: Zero heavy canvas framework dependencies. Bundled at just ~170 KB.

🚀 Installation

Obsidian

Install directly inside Obsidian:

  1. Open Settings → Community plugins (ensure Restricted mode is turned off).
  2. Click Browse and search for Merlay.
  3. Click Install, then Enable.

(Or view on the Obsidian Community Directory).

VS Code & Forks (Cursor, Devin, VSCodium)

Install directly from:

(Or search Merlay in your editor's Extensions view).


🛠️ Development

npm install     # Install dependencies
npm test        # Run tests
npm run build   # Build production bundles

Testing in the real apps

cp .env.example .env   # once: point MERLAY_VAULT_DIR at your vault
npm run install:obsidian   # build + install into your Obsidian vault (then Ctrl+R)
npm run install:vscode     # build + package + install into VS Code (then reload window)

For architecture details, see ARCHITECTURE.md.


Support

If Merlay saves you time, consider starring the repo — it helps others discover it.


📄 License

MIT License © 2026 Seyed Ali Hashemi