@@ -10,7 +10,6 @@ title: Excalidraw
1010* [ GitHub Repository] ( https://github.com/excalidraw/excalidraw )
1111
1212#### Tutorials
13- * [ Getting Started with Excalidraw] ( https://docs.excalidraw.com/docs/getting-started )
1413* [ React Integration Guide] ( https://docs.excalidraw.com/docs/@excalidraw/excalidraw/integration ) - Integration with React, Next.js (App Router and Pages Router), and browser usage
1514* YouTube: [ Excalidraw React Integration Tutorial] ( https://www.youtube.com/watch?v=pUv_3UmoGYM )
1615* YouTube: [ Building Collaborative Whiteboard with Excalidraw] ( https://www.youtube.com/watch?v=LXlE1y5PQsk )
@@ -49,13 +48,81 @@ title: Excalidraw
4948* Supports decompression for easier editing in Markdown view
5049
5150#### Integration with Static Sites (Jekyll/GitHub Pages)
51+
52+ ** Option 1: Static Export (Recommended for most cases)**
5253* Export diagrams as PNG (for complex visuals) or SVG (for scalable diagrams)
5354* Place exports in ` assets/images/ ` directory
5455* Embed in Markdown using standard image syntax or HTML with Tailwind classes
55- * Can embed interactive Excalidraw via iframe (requires external dependency)
5656* JSON format allows programmatic manipulation if needed
5757* Simpler integration than Figma - direct export, smaller file sizes
5858
59+ ** Option 2: Interactive Browser Integration**
60+ * Full interactive Excalidraw embedded directly in GitHub Pages
61+ * Uses ES modules and import maps (works in modern browsers)
62+ * Files created:
63+ * ` packages/excalidraw/index.js ` - Initialization script
64+ * ` excalidraw-demo.html ` - Standalone demo page
65+ * Usage:
66+ ``` html
67+ <!DOCTYPE html>
68+ <html >
69+ <head >
70+ <title >Excalidraw in browser</title >
71+ <meta charset =" UTF-8" />
72+ <link rel =" stylesheet"
73+ href =" https://esm.sh/@excalidraw/excalidraw@0.18.0/dist/dev/index.css" />
74+ <script >
75+ window .EXCALIDRAW_ASSET_PATH = " https://esm.sh/@excalidraw/excalidraw@0.18.0/dist/prod/" ;
76+ </script >
77+ <script type =" importmap" >
78+ {
79+ " imports" : {
80+ " react" : " https://esm.sh/react@19.0.0" ,
81+ " react/jsx-runtime" : " https://esm.sh/react@19.0.0/jsx-runtime" ,
82+ " react-dom" : " https://esm.sh/react-dom@19.0.0" ,
83+ " react-dom/client" : " https://esm.sh/react-dom@19.0.0/client"
84+ }
85+ }
86+ </script >
87+ </head >
88+ <body >
89+ <div class =" container" >
90+ <h1 >Excalidraw Embed Example</h1 >
91+ <div id =" app" ></div >
92+ </div >
93+ <script type =" module" src =" /packages/excalidraw/index.js" ></script >
94+ </body >
95+ </html >
96+ ```
97+ * Demo page: Visit ` /excalidraw-demo.html ` after deployment
98+ * Loading Excalidraw files: Add a ` ?file= ` parameter to load existing ` .excalidraw ` files:
99+ ``` html
100+ <!-- Load a specific Excalidraw file -->
101+ <iframe
102+ src =" /excalidraw-demo.html?file=/assets/js/sig_agent_architecture.excalidraw"
103+ width =" 100%"
104+ height =" 600px"
105+ frameborder =" 0"
106+ style =" border : 1px solid #e0e0e0 ; border-radius : 8px ;" >
107+ </iframe >
108+ ```
109+ * Embedding in Jekyll pages: Use an iframe to embed the interactive editor:
110+ ``` html
111+ <iframe
112+ src =" /excalidraw-demo.html"
113+ width =" 100%"
114+ height =" 600px"
115+ frameborder =" 0"
116+ style =" border : 1px solid #e0e0e0 ; border-radius : 8px ;" >
117+ </iframe >
118+ ```
119+ * Customization: Edit ` packages/excalidraw/index.js ` to add features like:
120+ * Loading initial drawings from JSON
121+ * Saving drawings to localStorage
122+ * Export functionality
123+ * Collaboration features
124+ * Custom event handlers
125+
59126#### Comparison with Figma
60127* ** Excalidraw** : Lightweight, hand-drawn style, faster for quick sketches. Simpler integration, smaller file sizes. Better for rapid ideation. JSON format is human-readable and editable
61128* ** Figma** : Full-featured design platform, polished UI/UX, better for professional designs and collaboration. More complex, requires export steps for static sites. Proprietary binary format
0 commit comments