• Stars
    star
    9,062
  • Rank 3,984 (Top 0.08 %)
  • Language
    TypeScript
  • License
    GNU General Publi...
  • Created over 4 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

This unofficial extension integrates Draw.io (also known as diagrams.net) into VS Code.

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.
  • 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



Like it so far? You might also like my open source Chrome extension that enhances the Github markdown editor!



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 diffs are important for you, you should prefer .drawio and avoid .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 editor to the right side (i.e. the second editor column) and navigate to a symbol, the diagram will stay visible.

Themes

Available Draw.io Themes
  • Theme "atlas"

    atlas
  • Theme "Kennedy"

    Kennedy
  • Theme "min"

    min
  • Theme "dark"

    dark

Associate .svg Files With The Draw.io Editor

By default, this extension only handles *.drawio.svg files. Add this to your VS Code settings.json file if you want to associate it with .svg files:

"workbench.editorAssociations": {
    "*.svg": "hediet.vscode-drawio-text",
}

You won't be able to edit arbitrary SVG files though - only those that have been created with Draw.io or this extension!

Editing the Diagram and its XML Side by Side

You can open the same *.drawio file with the Draw.io editor and as xml file. They are synchronized, so you can switch between them as you like it. This is super practical if you want to use find/replace to rename text or other features of VS Code to speed up your diagram creation/edit process. Use the View: Reopen Editor With... command to toggle between the text or the Draw.io editor. You can open multiple editors for the same file. This does not make much sense for SVG files though, as the draw.io diagram is stored in its metadata.

Contributors

  • Henning Dieterichs, hediet on Github (Main Contributor / Author)
  • Vincent RouillΓ©, Speedy37 on Github

See Also / Similar Extensions

  • Draw.io - This extension relies on the giant work of Draw.io. Their embedding feature enables this extension! This extension bundles a recent version of Draw.io.
  • vscode-drawio by eightHundreds.

Other Cool Extensions

If you like this extension, you might like my other extensions too:

More Repositories

1

vscode-debug-visualizer

An extension for VS Code that visualizes data during debugging.
TypeScript
7,859
star
2

vscode-realtime-debugging

An extension for VS Code that visualizes how a program is being executed in real time.
TypeScript
276
star
3

browser-ext-github-monaco

This extension brings the famous Monaco editor to Github
TypeScript
255
star
4

easy-attach

If the desired entry point to debugging is unclear (e.g. within webpack configurations) this tool will help you by not just waiting for a debugger to connect but also launching it from scratch. Don't use the excuse that attaching a debugger is cumbersome next time you use console.log for debugging!
TypeScript
109
star
5

node-reload

An advanced hot reload solution for Node apps. Works very well for developing VSCode extensions and automating websites with puppeteer.
TypeScript
100
star
6

visualization

A framework for visualizing data encoded as json.
TypeScript
96
star
7

slideo

This tool uses OpenCV to automatically synchronize slides with videos that show these slides.
Rust
94
star
8

ts-typed-sql

A fully typed sql builder. Not maintained anymore, use it for your inspiration.
JavaScript
54
star
9

rxjs-playground

A typescript playground for rx js.
TypeScript
49
star
10

vscode-hediet-power-tools

This extension provides various helper commands.
TypeScript
34
star
11

visual-keyboard

A virtual keyboard displaying key bindings of VS Code as you type.
TypeScript
30
star
12

ts-cli

A CLI Library for NodeJS/TypeScript
TypeScript
26
star
13

pdf.js-viewer

This package makes the PDF.js viewer available to third party applications.
JavaScript
19
star
14

hediet-ts-refactoring-lsp

A language server plugin for my own refactorings. Feel free to use them too!
TypeScript
13
star
15

vscode-delorean-js-debug

TypeScript
11
star
16

vscode-rpc

Provides an RPC interface to automate VSCode from other processes
TypeScript
11
star
17

rust-ffmpeg-frame-grabber

Provides a frame iterator for videos by using ffmpeg. Decodes images using the image crate.
Rust
10
star
18

vscode-tasks-statusbar

This extension adds buttons to the status bar to quickly start and kill tasks.
TypeScript
10
star
19

vscode-unicode-data

TypeScript
9
star
20

typed-json-rpc

A modern implementation of JSON RPC in TypeScript for NodeJs and Browsers. Not stable yet.
TypeScript
7
star
21

typed-lexer

An easy to use lexer that features typescript typings.
TypeScript
7
star
22

blog

My blog where I write about TypeScript, my own projects and other cool programming related stuff.
TypeScript
5
star
23

geml

Yet another json alternative with markdown support. Aims to replace xml. Rich tooling is planned.
TypeScript
4
star
24

masters-thesis

TeX
4
star
25

vscode-multi-cursor-enhancer

VS Code Selection Utilities
TypeScript
4
star
26

live-debug

Provides services to send events to a debugger that supports live debug.
TypeScript
4
star
27

ts-webpack-react-template

A template for applications based on TypeScript, Webpack and React.
TypeScript
4
star
28

ts-semver

A TypeScript implementation of the Semantic Version 2.0.0 specification.
TypeScript
3
star
29

starship-twitter-bot

Get notified right before a starship is about to launch.
TypeScript
3
star
30

ts-std

Personal util functions that enhance the js std library. I don't give much value on backwards compatibility, but will consider semantic versioning. If you like this library, you should fork it and make it your own!
TypeScript
2
star
31

csharp-UnitsOfMeasure

A Units of Measure library for .Net
C#
2
star
32

vscode-debug-visualizer-personal-scripts

debug-visualizer-custom-scripts
JavaScript
2
star
33

HowNodeJsModulesShouldHaveBeenDesigned

Demonstrates how the Node JS Module Loader could work if it had been designed properly.
JavaScript
2
star
34

git-line-endings

Tests all combination of git line ending settings.
TypeScript
2
star
35

diff-merge-dataset

TypeScript
2
star
36

Neo2Net

Neo2 Keyboard Layout implemented in C#
C#
2
star
37

klingeling

JavaScript
2
star
38

semantic-json

TypeScript
2
star
39

rust-visualizer

Rust Visualizer Library. Based on the Debug Visualizer Extension for VS Code.
SCSS
2
star
40

project-issues-auto-importer

Automatically adds issues from a given repository to a given project
TypeScript
2
star
41

PredicateLogicProofValidator

A validator for predicate logic proofs that can be extended with custom axioms and rules.
TypeScript
2
star
42

sinfonie-und-kammerorchester.kit.edu

Some static files.
HTML
1
star
43

ext-vscode-syntax-tree-viewer

Visualizes Syntax Trees in VS Code
TypeScript
1
star
44

monaco-editor-react

This library exposes the monaco editor as a react component.
TypeScript
1
star
45

LambdaCalculus

TypeScript
1
star
46

GrammarTools

C#
1
star
47

lean-linear-integer-equation-solver

Lean
1
star
48

CodeItDebugger

JavaScript
1
star
49

rider-plugin-debug-visualizer-dotnet-sdk

C#
1
star
50

php-type-reflection

A library which provide classes to reflect php types in an unified way.
PHP
1
star
51

php-contracts

An assertion library for PHP to validate arguments and invariants.
PHP
1
star
52

propa2017

Haskell
1
star
53

vscode-3wm-test-repo

Test Repo For The VS Code 3 Way Merge Editor Feature
TypeScript
1
star
54

vscode-custom-web-editor

TypeScript
1
star
55

npm-template

TypeScript
1
star
56

ts-react-svg-demo

An application that demonstrates how react and svg can be used together.
TypeScript
1
star
57

ext-vs-ProjectAsCustomTool

Provides a custom tool that enables to use projects in the active solution for code generation.
C#
1
star
58

git-demo

Git Demo
TypeScript
1
star