Skip to content

Commit fc21b8b

Browse files
bric3lionelhorn
andcommitted
feature: Load embedded images from excalidraw files
This was contributed by @lionelhorn. Approach is to wait for the "update" message that has the embedded files then create `initialData` with the files and only then render the Excalidraw component. Mobx is used for state management replacing react `useState`. Which is easier to get the code a bit cleaner code than passing the setters of `useState` to the bridge. Co-authored-by: Lionel <dev@lionelhorn.com>
1 parent 80c2bef commit fc21b8b

File tree

10 files changed

+506
-365
lines changed

10 files changed

+506
-365
lines changed

excalidraw-assets/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
"@types/react": "^18.0.0",
1313
"@types/react-dom": "^18.0.0",
1414
"awesome-debounce-promise": "^2.1.0",
15+
"mobx": "6.13.1",
16+
"mobx-react": "9.1.1",
1517
"react": "^18.0.0",
1618
"react-app-rewired": "^2.1.8",
1719
"react-dom": "^18.0.0",

0 commit comments

Comments
 (0)