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:
@ -2191,7 +2191,10 @@ export class App extends React.Component<any, AppState> {
|
||||
onPointerLeave={this.removePointer}
|
||||
onDrop={event => {
|
||||
const file = event.dataTransfer.files[0];
|
||||
if (file?.type === "application/json") {
|
||||
if (
|
||||
file?.type === "application/json" ||
|
||||
file?.name.endsWith(".excalidraw")
|
||||
) {
|
||||
loadFromBlob(file)
|
||||
.then(({ elements, appState }) =>
|
||||
this.syncActionResult({ elements, appState }),
|
||||
|
Reference in New Issue
Block a user