Export & backup
Export a local scene as .excalidraw (re-importable with identical positions) or SVG (download content only, never injected into the DOM); PNG needs a real injected rasterizer and otherwise errors explicitly.
Inputs and parameters
format— Export formatpresetId— PresetsceneText— Custom .excalidraw text
Real example
format=svg, presetId=flow-sketch; the scene has Chinese labels "Start", "Refine", "Review" and 2 arrows.
→ Download draw-export-20261115T040000Z.svg (image/svg+xml) with <rect>/<polyline>/<text>; Chinese and <&> are XML-escaped; scanSvgThreats.safe=true, domInjection=false, and the SVG is never inserted into the page.
Limits and failure handling
SVG is generated from our scene model, not the upstream Excalidraw renderer; it contains no self-hosted fonts or remote images, and font fallback depends on the viewer. PNG is unavailable this round. Export files carry no analytics data or private tokens; download-then-import is the only cross-site v1 path.
FAQ
Is exported SVG displayed inline?
No. SVG is download content only; any DOM-injection request returns download-only / injectIntoDom=false.
Why is PNG unavailable?
There is no browser Canvas and the upstream engine is not integrated this round. Without an injected rasterizer it throws PNG_RASTERIZER_UNAVAILABLE; with a mock rasterizer the result is labeled mock, never presented as real rendering.
What is the filename rule?
draw-<operation>-<UTC timestamp>.<ext>, e.g. draw-export-20261115T040000Z.excalidraw; no text, file names or user input leak into it.