Skip to content
| Marketplace
Sign in
Visual Studio Code>Visualization>Visual MermaidNew to Visual Studio Code? Get it now.
Visual Mermaid

Visual Mermaid

Jorge Varas

| (0) | Free
Visually edit Mermaid diagrams in Markdown files.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

VS Code Visual Mermaid

A VS Code extension for visually editing a Mermaid fenced block in a Markdown file. It opens the block under the cursor in a local webview built from adapted Mermaid Sketcher modules and applies changes back to that block.

Use

  1. Open a Markdown file and put the cursor in a supported Mermaid fence.
  2. Run Visual Mermaid: Edit Mermaid Block Visually from the editor title/context menu or Command Palette.
  3. Edit the diagram in the canvas or Text tab.
  4. Choose Apply to Markdown to update the Markdown buffer and keep editing, or close the visual panel to apply its latest draft. Cancel closes without applying.
  5. Save the Markdown file using VS Code's normal save command.

Supported fences are root-level CommonMark fences with zero to three leading spaces, at least three backticks or tildes, and a case-insensitive mermaid info-string token. Trailing info attributes are allowed. Nested-list and unclosed fences are not supported. Changes to the selected block while the panel is open produce a conflict; edits elsewhere in the document are preserved.

The extension supports VS Code desktop and remote extension hosts, version 1.85 or later. Browser extension hosts are not supported in this initial implementation.

The diagram-type selector starts a new empty diagram of the selected interactive type after confirmation; it replaces the current diagram source. The webview follows VS Code's light or dark theme, including Mermaid connector colors, zoom controls, and the Elements and Properties panels.

Build and verify

Requires Node.js 20 or later and npm.

npm install
npm test
npm run build
npm run package

npm test runs the extension-host tests and the copied editor module suite. npm run package creates a local VSIX after building. Install it for local smoke testing with VS Code's Install from VSIX... command or code --install-extension <file.vsix>.

Reuse and release

The webview copies and adapts selected first-party modules from the sibling Mermaid Sketcher project. It packages local Mermaid 12.3.0 and CodeMirror 5.65.21 assets and does not depend on the sibling project at runtime. Dependency notices and the elkjs 0.12.0 source are included in the VSIX.

The extension's first-party code is licensed under the MIT License. The manifest uses local as a packaging placeholder; choose a Marketplace publisher identity before publishing.

Project documentation

Implementation decisions, engineering guidance, and the feature plan are maintained in the repository's docs/ directory.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft