✅ Overview
Scimax VS Code integrates with the Excalidraw VS Code extension to provide seamless support for creating and editing diagrams directly from org-mode documents.
✅ Prerequisites
Install the Excalidraw extension from the VS Code marketplace:
| Extension ID | Name |
|---|---|
| pomdtr.excalidraw-editor | Excalidraw Editor |
You can install it via:
Command Palette:
Extensions: Install Extensions→ search "Excalidraw"Or run:
code --install-extension pomdtr.excalidraw-editor
✅ Supported File Formats
Excalidraw supports multiple file formats, all of which work with this integration:
| Extension | Description | Hover Preview |
|---|---|---|
| .excalidraw | Native Excalidraw format (JSON) | Via exports |
| .excalidraw.json | Explicit JSON format | Via exports |
| .excalidraw.svg | SVG with embedded Excalidraw scene data | Yes |
| .excalidraw.png | PNG with embedded Excalidraw scene data | Yes |
These formats show hover previews directly
They embed the full Excalidraw scene data, so they remain fully editable
They can be displayed in exports (HTML, LaTeX, Markdown)
Creating Excalidraw Links
Use standard org-mode link syntax to reference Excalidraw drawings:
Basic Links
✅ Hover Preview
When you hover over an Excalidraw link, a tooltip appears showing:
Drawing name - The filename or link description
Visual preview - For all Excalidraw file types:
Element count - Number of shapes in the drawing
File information - Size and last modified date
The hover preview for .excalidraw files renders a simplified SVG showing:
Rectangles, ellipses, and diamonds with their colors
Lines and arrows with arrowheads
Freedraw paths
Text and image placeholders
For best results, the extension first looks for companion export files (same name
with .svg or .png extension). If none exist, it generates a preview from the
JSON data.
✅ Click to Edit
Clicking an Excalidraw link opens the drawing in the Excalidraw visual editor.
✅ Existing Files
When you click a link to an existing Excalidraw file:
The file opens in the Excalidraw editor
You can edit the drawing visually
Changes are saved automatically
✅ New Files (Auto-creation)
When you click a link to a non-existent Excalidraw file:
The file is automatically created with an empty drawing
Parent directories are created if needed
The new drawing opens in the Excalidraw editor
This makes it easy to create new diagrams - just write the link and click it:
# This file doesn't exist yet - clicking creates it
[[new-diagram.excalidraw][My New Diagram]]
✅ Fallback Behavior
If the Excalidraw extension is not installed:
The file opens as a text document (showing JSON)
A message suggests installing the Excalidraw extension
✅ Commands
| Command | Description | Invocation |
|---|---|---|
| scimax.org.openExcalidraw | Open Excalidraw Drawing | Click on link |
The command is automatically invoked when clicking Excalidraw links. It can also be called programmatically:
vscode.commands.executeCommand('scimax.org.openExcalidraw', {
file: '/path/to/drawing.excalidraw'
});
✅ Workflow Tips
✅ Organizing Drawings
Keep drawings organized alongside your org files:
project/
├── notes.org
├── diagrams/
│ ├── architecture.excalidraw.svg
│ ├── dataflow.excalidraw.svg
│ └── ui-mockup.excalidraw.png
└── docs/
└── design.org
✅ Export for Sharing
Excalidraw's .excalidraw.svg and .excalidraw.png formats are ideal because:
They display correctly in web browsers and image viewers
They can be embedded in HTML/PDF exports
They retain full editability (scene data is embedded)
✅ Version Control
All Excalidraw formats are text-based (JSON or JSON-embedded), making them
suitable for version control with git. The .excalidraw.svg format shows
meaningful diffs for the SVG portions.
✅ Troubleshooting
✅ Drawing won't open in visual editor
Ensure the Excalidraw extension is installed:
pomdtr.excalidraw-editorCheck that the file extension is correct (
.excalidraw,.excalidraw.json,Try reloading VS Code window
✅ No hover preview appears
All Excalidraw file types now show hover previews
For
.excalidrawfiles, a simplified SVG is generated from the JSONThe file must exist on disk for preview to work
Empty drawings show "Empty drawing" instead of a preview
✅ Link not recognized as Excalidraw
Ensure the file extension is one of:
.excalidraw.excalidraw.json.excalidraw.svg.excalidraw.png