Draw.io integration with Org Mode in Emacs
- Emacs Lisp 98.9%
- Makefile 1.1%
| tests | Modify test file | |
| org-drawio.el | Add tests directory | |
| README.org | Add screencast | |
| screencast.gif | Add screencast | |
org-drawio: Draw.io integration with Org Mode in Emacs
Open and preview diagrams created with draw.io inside Emacs and Org mode.
Note that this is work in progress!
/timmli/org-drawio/media/branch/main/screencast.gif
This README uses Org mode.
Usage & Features
When org-drawio-mode is enabled, drawio documents can be integrated in Org buffers using drawio links, for example [[drawio:test.drawio]], with two main functions:
- Preview of the drawio file, if it exists
- Clicking on the link or the preview will open the file in the drawio desktop client, which needs to be installed separately, see Installation.
Installation
Dependencies
- draw.io as desktop installation. I highly recommend using the AppImage.
Installation with Melpa
Not yet available.
Installation from Github
Download /timmli/org-drawio/src/branch/main/org-drawio.el to your .emacs.d folder and add the following code to your init file:
(use-package org-drawio
:after org
:load-path "relative/path/to/org-drawio.el"
:config
(add-hook 'org-mode-hook 'org-drawio-mode))
Configuration
Certain org-drawio variables are customizable, see (customize-group "org-drawio").
The following are probably the most relevant ones:
org-drawio-executable: drawio executable used when opening and exporting a drawio fileorg-drawio-transparent: if non-nil, export with transparent backgroundorg-drawio-image-file-name-format: format string of the files automatically generated for the previews
Ideas & plans
- Export to HTML, LaTeX, ...
Alternative and related Emacs packages
- org-xournalpp: similar package for xournalpp documents, that very much inspired org-drawio.
- org-krita: similar package for krita documents, of which org-xournalpp is a fork.