Simple Plugin provides a bridge between emacs and obsidian-exlicalidraw, works both in orgmode
and markdown
.
demo.mp4
Need obsidian-excalidraw plugin installed, and set Auto Export to svg(or png)
(add-to-list 'load-path "[path-to-repo]")
(require 'emacs-obsidian-excalidraw)
(setq emacs-obsidian-excalidraw-vault "[excalidraw vault name]")
(setq emacs-obsidian-excalidraw-vault-dir "[excalidraw file directory]")
(setq emacs-obsidian-excalidraw-image-format "png") ;; you should enable correspond format auto export in excalidraw
emacs-obsidian-excaliraw-create
will create a excalidraw file in vault, then auto open in obsidian- after finishing your drawing in obsidian,
Ctrl S
to trigger auto export M-x org-toggle-inline-images
orM-x markdown-toggle-inline-images
will display your image- if you want to edit the image, click on the drawing(or raw link), then
M-x emacs-obsidian-excalidraw-open-at-point
- [X] add png support
- [X] add markdown file link support
- [X] check multi-platform support: windows, mac
- since using
browse-url
instead ofbrowse-url-xdg-open
to invoke obsidian, this methods should works cross platform
- since using
- [X] open excalidraw directly without toggle link first
- [ ] auto switch light/dark theme
- [ ] auto redisplay image while file changed
- [ ] support different excalidraw file directory other than root in obsidian