Change the extension to .excalidraw (#858)
* Change the extension to .excalidra * Support opening as well * support .excalidraw extension on canvas DranAndDrop Co-authored-by: Faustino Kialungila <Faustino.kialungila@gmail.com>
This commit is contained in:
@ -83,7 +83,7 @@ export async function saveAsJSON(
|
||||
) {
|
||||
const serialized = serializeAsJSON(elements, appState);
|
||||
|
||||
const name = `${appState.name}.json`;
|
||||
const name = `${appState.name}.excalidraw`;
|
||||
await fileSave(
|
||||
new Blob([serialized], { type: "application/json" }),
|
||||
{
|
||||
@ -96,7 +96,7 @@ export async function saveAsJSON(
|
||||
export async function loadFromJSON() {
|
||||
const blob = await fileOpen({
|
||||
description: "Excalidraw files",
|
||||
extensions: ["json"],
|
||||
extensions: ["json", "excalidraw"],
|
||||
mimeTypes: ["application/json"],
|
||||
});
|
||||
return loadFromBlob(blob);
|
||||
|
Reference in New Issue
Block a user