UNPKG

tldraw

Version:

A tiny little drawing editor.

18 lines (17 loc) 418 B
async function pasteFiles(editor, blobs, point, sources) { const files = blobs.map( (blob) => blob instanceof File ? blob : new File([blob], "tldrawFile", { type: blob.type }) ); editor.markHistoryStoppingPoint("paste"); await editor.putExternalContent({ type: "files", files, point, ignoreParent: false, sources }); } export { pasteFiles }; //# sourceMappingURL=pasteFiles.mjs.map