@mocanvas/mocanvas · function
declare function defaultHandleExternalFileReplaceContent(editor: Editor, info: {
files: File[];
shapeId: ShapeId;
}, opts: TLDefaultExternalContentHandlerOpts): Promise<void>Replace the asset behind an existing shape with one built from file.
The shape keeps its position, size and every other prop — which is the point: "swap this photo for that one" should not move or resize anything.
mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.