mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Add Native File System API saving/exporting and opening (#388)
* Add Native File System API saving/exporting * Add Native File System API opening * Add origin trial token placeholder * Reuse an opened file handle for better saving experience * Fix file handle reuse to only kick in for Excalidraw files * Remove reference
This commit is contained in:
parent
f4d4b323e1
commit
7ddc206b8c
4 changed files with 143 additions and 39 deletions
|
@ -39,6 +39,10 @@ export const actionClearCanvas: Action = {
|
|||
aria-label="Clear the canvas & reset background color"
|
||||
onClick={() => {
|
||||
if (window.confirm("This will clear the whole canvas. Are you sure?")) {
|
||||
// TODO: Defined globally, since file handles aren't yet serializable.
|
||||
// Once `FileSystemFileHandle` can be serialized, make this
|
||||
// part of `AppState`.
|
||||
(window as any).handle = null;
|
||||
updateData(null);
|
||||
}
|
||||
}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue