mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
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:
parent
5fff1f2d3e
commit
0ee33fe341
2 changed files with 6 additions and 3 deletions
|
@ -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 }),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue