fix pasting svg from clipboard (#884)

pull/886/head
Judicael 2022-08-04 23:43:57 +03:00 zatwierdzone przez GitHub
rodzic 7fce946428
commit c527e0547b
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 2 dodań i 4 usunięć

Wyświetl plik

@ -1765,9 +1765,8 @@ export class TldrawApp extends StateManager<TDSnapshot> {
paste = async (point?: number[], e?: ClipboardEvent) => {
if (this.readOnly) return
const shapesToCreate: TDShape[] = []
const filesToPaste: File[] = []
const shapesToCreate: TDShape[] = []
let clipboardData: any
@ -1855,11 +1854,10 @@ export class TldrawApp extends StateManager<TDSnapshot> {
}
case 'text/plain': {
if (str.startsWith('<svg')) {
getSvgFromText(str)
await getSvgFromText(str)
} else {
getShapeFromText(str)
}
// return
break
}
}