Skip to content

Import and export Excalidraw, and paste from it - #87

Merged
raj-khan merged 1 commit into
mainfrom
fl-84-excalidraw
Sep 27, 2026
Merged

raj-khan merged 1 commit into
mainfrom
fl-84-excalidraw

Conversation

@raj-khan

Copy link
Copy Markdown
Owner

FL-84.

  • Import (src/domain/excalidraw.js): .excalidraw files and Excalidraw clipboard data. Rectangles, ellipses, diamonds, loose text and frames become shapes named by their bound text; arrows bound to a shape at both ends become connections (label, dashed, two-way, and a head at the start read the way it points); free drawing becomes ink with its pressure; deleted elements are ignored. Lines, images, embeds and loose arrows are counted and listed as skipped. Excalidraw's roughness turns on sketch style.
  • Where: a new Import dialog format, and pasting Excalidraw shapes straight onto the canvas (one undo). The dialog now lists warnings without a line number for formats that have none.
  • Export: Export gains Excalidraw. Frames first; shapes with bound text labels; arrows bound on both shapes; ink as freedraw with pressures. Each element carries its isketch kind, description and notes in customData, so a round trip is exact; seeded, so the output is stable.

Tests: excalidraw.spec.js unit (9, round trip included) and e2e (2). e2e 138, vitest 279, lint and typecheck.

.excalidraw files and Excalidraw clipboard data become shapes, bound
arrows and ink, with skipped elements listed. Export writes a file whose
shapes carry their isketch kind, so a round trip is exact.
@raj-khan
raj-khan merged commit b4c27a0 into main Sep 27, 2026
4 checks passed
@raj-khan
raj-khan deleted the fl-84-excalidraw branch September 27, 2026 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant