fix pasting svg from clipboard (#884)
This commit is contained in:
parent
7fce946428
commit
c527e0547b
1 changed files with 2 additions and 4 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue