Excalidraw
Virtual whiteboard for sketching hand-drawn style diagrams
Alternative to: Miro, FigJam, Google Jamboard
v0.9.0
2021-07-10Excalidraw API
Features
-
restore(data, localAppState, localElements)andrestoreElements(elements, localElements)now takelocalElementsargument which will be used to ensure existing elements’ versions are used and incremented. This fixes an issue where importing the same file would resolve to elements with older versions, potentially causing issues when reconciling #3797.BREAKING CHANGE
localElementsargument is mandatory (can benull/undefined) if using TypeScript.
-
Support
appState.exportEmbedSceneattribute inexportToSvgwhich allows to embed the scene data #3777.BREAKING CHANGE
- The attribute
metadatais now removed asmetadatawas only used to embed scene data which is now supported with theappState.exportEmbedSceneattribute. exportToSvgnow resolves to a promise which resolves tosvgof the exported drawing.
- The attribute
-
Expose
loadLibraryFromBlob,loadFromBlob, andgetFreeDrawSvgPath#3764. -
Expose
FONT_FAMILYso that consumer can use when passinginitialData.appState.currentItemFontFamily#3710. -
Added prop
autoFocusto focus the excalidraw component on page load when enabled, defaults to false #3691.Note: Earlier Excalidraw component was focussed by default on page load, you need to enable
autoFocusprop to retain the same behaviour. -
Added prop
UIOptions.canvasActions.export.renderCustomUIto support Custom UI rendering inside export dialog #3666. -
Added prop
UIOptions.canvasActions.saveAsImageto show/hide the Save as image button in the canvas actions. Defauls totruehence the Save as Image button is rendered #3662. -
Export dialog can be customised with
UiOptions.canvasActions.export#3658.Also,
UIOptionsis now memoized to avoid unnecessary rerenders.BREAKING CHANGE
UIOptions.canvasActions.saveAsSceneis now renamed toUiOptions.canvasActions.export.saveFileToDisk. Defaults totruehence the save file to disk button is rendered inside the export dialog.exportToBackendis now renamed toUIOptions.canvasActions.export.exportToBackend. If this prop is not passed, the shareable-link button will not be rendered, same as before.
Fixes
- Use excalidraw Id in elements so every element has unique id #3696.
Refactor
-
BREAKING CHANGE
- Rename
UIOptions.canvasActions.saveScenetoUIOptions.canvasActions.saveToActiveFile#3657. - Removed
shouldAddWatermark: booleanattribute from options for export APIs #3639. - Removed
appState.shouldAddWatermarkso in case you were passingshouldAddWatermarkin initialData.AppState it will not work anymore.
- Rename
Excalidraw Library
This section lists the updates made to the excalidraw library and will not affect the integration.
Features
-
Switch to selection tool on library item insert #3773
-
Show active file name when saving to current file #3733
-
Add hint around text editing #3708
-
Change library icon to be more clear #3583
-
Pass current
themewhen installing libraries #3701 -
Update virgil font #3692
-
Support exporting json to excalidraw plus #3678
-
Save exportScale in AppState #3580
-
Add shortcuts for stroke and background color picker #3318
-
Exporting redesign #3613
-
Auto-position tooltip and suport overflowing container #3631
-
Auto release @excalidraw/excalidraw-next on every change #3614
-
Allow inner-drag-selecting with cmd/ctrl #3603
Fixes
-
view mode cursor adjustments #3809.
-
Pass next release to updatePackageVersion & replace ## unreleased with new version #3806
-
Include deleted elements when passing to restore #3802
-
Import React before using jsx #3804
-
Ensure
sandgshortcuts work on no selection #3800 -
Keep binding for attached arrows after changing text #3754
-
Deselect elements on viewMode toggle #3741
-
Allow pointer events for disable zen mode button #3743
-
Use rgba instead of shorthand alpha #3688
-
Color pickers not opening on mobile #3676
-
On contextMenu, use selected element regardless of z-index #3668
-
SelectedGroupIds not being stored in history #3630
-
Overscroll on touch devices #3663
-
Small UI issues around image export dialog #3642
-
Normalize linear element points on restore #3633
-
Disable pointer-events on footer-center container #3629
Refactor
Performance
- Improve arrow head sizing #3480