hediet /vscode-drawio
This unofficial extension integrates Draw.io (also known as diagrams.net) into VS Code.
★ 9,515⑂ 470👁 63⑃ 180● 357▤ 0
More from this author
+1
Daily
9,515
stars
470
forks
63
watchers
180
prs
357
issues
0
releases
README
Draw.io VS Code Integration
This unofficial extension integrates Draw.io (also known as diagrams.net) into VS Code.
Mentioned in the official diagrams.net blog.
Features
- Edit .drawio, .dio, .drawio.svg or .drawio.png files in the Draw.io editor.
- To create a new diagram, simply create an empty .drawio, .drawio.svg or .drawio.png file and open it.
- .drawio.svg are valid .svg files that can be embedded in Github readme files! No export needed.
- .drawio.png are valid .png files! No export needed. You should use .svg though whenever possible - they look much better!
- To convert between different formats, use the Draw.io: Convert To... command.
- .drawio files are plain XML: they diff cleanly in git, and AI assistants can read, edit and review diagram changes like any other code.
- Uses an offline version of Draw.io by default.
- Multiple Draw.io themes are available.
- Use Liveshare to collaboratively edit a diagram with others.
- Nodes/edges can be linked with code spans.
Demo
!
Editing .drawio.svg/.drawio.png Files
You can directly edit and save .drawio.svg and .drawio.png files.
These files are perfectly valid svg/png-images that contain an embedded Draw.io diagram.
Whenever you edit such a file, the svg/png part of that file is kept up to date.
The logo of this extension is such a .drawio.png file that has been created with the extension itself!
!
If you want readable diffs, for your reviewers and your AI tools alike, prefer .drawio over .drawio.png diagrams.
Collaboratively Edit Or Present Diagrams
With version 1.0 of this extension, extensive support for VS Code Liveshare has been added. You can now edit or present your Draw.io diagrams remotely, while seeing each participant's cursor and selection! This can be used for discussing, reviewing or brainstorming diagrams.
With Draw.io's freehand drawing tool and integrated LaTeX support, this extension becomes an advanced whiteboard solution that can be used for remote code interviews!
!
_Internally, this extension synchronizes Draw.io diagrams with text documents.
These text documents are shared by Liveshare. As Liveshare has no understanding of the text, modification conflicts might occur on simultaneous modifications._
Code Link Feature
In the status bar, you can enable or disable the code link feature.
If it is enabled and you double click on a node whose label starts with ,
you will perform a workspace search for a symbol matching the rest of the label.
If you have a node labeled MyClass and a class of name MyClass, you will jump to its source if you double click the node!
Please note that you have to open at least one file of the project that contains the symbol.
Otherwise, VS Code will not consider this project when searching for symbols.
This file itself does not have to contain the symbol though.
Thanks to my latest github sponsors, this feature is open source and freely available now.
_TIP_: If you open the draw.io edTop issues
#55Support PDF Export / Direct Edit22 comments · 2020-05-22#182User-defined graphics library16 comments · 2020-11-15#180Mathematical Typesetting Exporting Issue12 comments · 2020-11-12#380Synchronization Loss11 comments · 2023-03-27#167Feature request: like Code Link, but can link to anything, not only to a symbol (class)?11 comments · 2020-10-21#455Color eyedropper bug9 comments · 2025-02-15#210Use url for customLibraries8 comments · 2021-02-25#171Persist Scratchpad8 comments · 2020-10-23
Discussions
#482code link for legency C++ code using drawio0 comments · 2025-08-07#474How to insert text without formatting (Ctrl+Shift+V don't work)?0 comments · 2025-06-16#471set as default style works but until i close the file0 comments · 2025-05-14#464vsix file1 comments · 2025-04-16#449Highlight XML portion of selected shape0 comments · 2024-12-11#425how add custom library0 comments · 2024-04-08#419Created a quick video overview and donated!0 comments · 2024-02-19#417ETA for new version0 comments · 2024-01-19