A lightweight, embeddable Excalidraw viewer/editor — hosted on Cloudflare Pages, reads .excalidraw files directly from GitHub.
https://<your-pages-domain>/?file=<raw-url-to-excalidraw-file>
Example (GitHub raw URL):
https://embedidraw.workers.dev/?file=https://raw.githubusercontent.com/you/repo/main/diagram.excalidraw
| Mode | Behaviour |
|---|---|
| Interact (default) | Pan, zoom, and drag unlocked elements. No toolbar shown. |
| Edit | Full Excalidraw editor with toolbar. |
Toggle with the ✏ Edit / 👁 View button (bottom-right), or press Alt+E.
To prevent an element from being dragged in Interact mode, lock it in Excalidraw: select it → right-click → Lock.
<iframe
src="https://embedidraw.pages.dev/?file=https://raw.githubusercontent.com/you/repo/main/diagram.excalidraw"
style="width: 100%; height: 500px; border: none; border-radius: 8px;"
loading="lazy"
title="Diagram"
></iframe>- Push this repo to GitHub.
- In the Cloudflare dashboard → Pages → Create project → Connect to Git.
- Set Build command:
npm run buildand Output directory:dist. - Deploy. Done.
Or via CLI:
npm install
npm run deploy # builds + deploys via wranglernpm install
npm run dev # http://localhost:5173