Draw.io View

by sdking
5
4
3
2
1
Score: 51/100

Description

Renders draw.io diagrams inside Obsidian notes via fenced code blocks, powered by @maxgraph/core.

Reviews

No reviews yet.

Stats

7
stars
573
downloads
0
forks
62
days
4
days
4
days
0
total PRs
0
open PRs
0
closed PRs
0
merged PRs
0
total issues
0
open issues
0
closed issues
48
commits

Latest Version

5 days ago

Changelog

🚀 Features

  • feat: add magnifier tool for inspecting diagram detail

📝 Documentation

  • docs: refresh manifest description for current feature set

Full changelog: https://github.com/SdKay/obsidian-drawio-view/compare/0.0.11...0.0.12

README file from

Github

Render draw.io .drawio diagrams inline inside your Obsidian notes — with smooth zoom, pan, multi-page tabs, shape links, and full support for third-party shape libraries.


Usage

Place your .drawio file anywhere in the vault, then embed it with a fenced code block:

```drawio-view
my-diagram.drawio
```

You can optionally set the starting page, height, zoom, and pan offset:

```drawio-view
my-diagram.drawio|my_page|600px|80%|(190, 34)
```
Parameter Format Example Description
Page page name or page-N my_page · page-2 Which page to display. Default: first page.
Height Npx 600px Viewer height. Default: 400 px.
Zoom N% 80% Initial zoom level. Default: auto-fit.
Offset (X, Y) (190, 34) Initial pan position. Default: centred.

All parameters are optional and can appear in any order.


Shape Libraries

If your diagram uses extended shape libraries (AWS, Azure, GCP, Cisco, Electrical, IBM, and many more), the plugin will detect this automatically and show a download banner the first time you open it.

Click Download — the missing libraries are fetched from draw.io's official repository, saved locally, and reused for all future diagrams. The banner also has a Settings shortcut if you prefer to manage libraries manually.

Go to Settings → Draw.io View → Shape Libraries to:

  • Browse and download official libraries by category
  • Use Auto-detect from vault to find all libraries needed by your existing diagrams
  • Set a custom folder for your own shape files

Controls

Action Result
Scroll wheel Zoom in / out
Drag Pan the diagram
Two-finger pinch Pinch-zoom (touch / mobile)
Double-click Reset to initial view
Drag bottom edge Resize viewer height
Open file in system default editor
Auto-fit to the viewer's current size
🔍 Toggle the magnifier
Save current view back into the code block
Page tabs Switch pages (multi-page diagrams)

Tip: pan and zoom to the view you want, then click ⊙. The code block updates in-place and that view is restored every time you open the note. Once a specific zoom/offset is saved this way, double-click restores that saved view rather than auto-fitting — click ⛶ to get back to a fresh auto-fit (e.g. after resizing the viewer), then ⊙ again to save it.

Hover any shape to see a button. Click it to attach a link to a vault note or external URL. To follow the link, click the shape (exact key depends on the Click behavior setting).

Magnifier

Click 🔍 to inspect fine detail without changing your zoom/pan. A circular loupe follows the cursor at a fixed magnification; + / - change its size. Scroll wheel still zooms the main view as usual. Press Esc or click anywhere else to exit.


Dark mode

The viewer automatically adapts to Obsidian's dark theme — no configuration needed.


Settings

Setting Description
Zoom modifier key Plain scroll or Ctrl+scroll to zoom.
Click behavior Whether a plain click or Ctrl+click follows a shape link.
Custom library folder A vault folder for your own shape files.
Shape Libraries Download official libraries; auto-detect from vault.

Installation

  1. Settings → Community plugins → Browse
  2. Search draw.io view → Install → Enable

Manual

Download main.js, manifest.json, and styles.css from the latest release and copy them to <vault>/.obsidian/plugins/drawio-view/.


Known limitations

  • Some shapes from draw.io's table or extended shape sets may not render perfectly.
  • ![[file.drawio]] wiki-embed syntax is not supported — use the code block instead.
  • In Live Preview, exiting the code block editor can cause a small scroll shift (under investigation).

Star History

Star History Chart


License

MIT © 2026 sdking.xing