Repository navigation
Excalidraw 2.2.0: edit .excalidraw.svg and .excalidraw.png images - #79
Merged
nwparker merged 4 commits intoNov 8, 2026
Merged
Conversation
Opens SVG and PNG images that carry an embedded Excalidraw scene in the editor, and saves them in the same format: the scene is embedded the way Excalidraw does (deflated bstring payload in SVG <metadata> or a PNG tEXt chunk) and the picture is drawn again from it, keeping the image's scale, background and dark mode. Edits send the new scene at once; the picture follows once the canvas is idle, and a save waits for it within Orca's flush deadline. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
A save of an .excalidraw.svg or .excalidraw.png now times itself from the start of Orca's flush: the picture's handler registers before the session's, and the session reports how long its last encode and decode took. The new picture goes into the save only if sending it still ends within 800 ms of Orca's 1 s; otherwise it is drawn once the canvas is idle and sent after the save. A picture drawn during a save is held until the save decides, and the drawing starts only after the scene's own send, so it never slows a save it cannot join. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Closes #77. The Excalidraw plugin (2.1.0 → 2.2.0) now opens and saves
.excalidraw.svgand.excalidraw.pngimages that carry an embedded scene. These are the files Excalidraw writes when you export with "Embed scene" on.excalidraw-svgandexcalidraw-png. They are served from a second entry page,editor/image.html. Plain.svg/.pngfiles are not claimed.build/src/excalidraw-image.js, synchronous): reads and writes Excalidraw's embed format.<!-- payload-start -->base64 JSON wrapper, compressed (deflate) or plain, in the legacy v1 or the current v2 form.tEXtchunk with keywordapplication/vnd.excalidraw+json, written right after IHDR because Excalidraw reads only the firsttEXtchunk. Each chunk gets a correct CRC.exportToSvg/exportToBloband embeds the scene again. The picture keeps the file's scale, padding, background and dark mode. Excalidraw'sloadFromBlobreads our output back unchanged.editor.flushdeadline.editor/; the build is deterministic.README.mdandbuild/README.md.orca-catalog.json, generated byscripts/release-entry.mjs --writeand re-pinned after the deadline fix.Verification
cd plugins/excalidraw/build && npm test: 22/22 pass. Covered:editor/against a fake Orca host that enforces Orca's CSP and the 1 s flush deadline: 65/65 checks pass. Covered:loadFromBlobreads our output.ORCA_DIR=<orca@81ec82b> node scripts/release-entry.mjs:release entries: ok.node scripts/check-catalog.mjs:catalog: ok.orca plugin validate plugins/excalidraw: valid, 3 custom editors.orca plugin check plugins/excalidraw: valid with no errors. It shows the same 4editor_evalwarnings (from bundled Excalidraw code) as onmain.orca plugin shot --editorin real Orca (1.4.254) rendered both new editors with their embedded scenes.Execution profile (for anything above
data, say why it is needed)sandboxed-ui, the same as 2.1.0. Excalidraw has to run as a custom editor in Orca's isolated editor frame. This change adds no capabilities, permissions or network access.