@mocanvas/mocanvas · function
declare function defaultHandleExternalUrlContent(editor: Editor, info: {
url: string;
point?: VecLike;
}, opts?: ExternalUrlContentOptions): Promise<void>Handle a url that arrived from outside the editor.
Resolves once the shape exists. It does not reject on an unfurl failure: a
link card that says where it points is a better outcome than nothing, so a
failed unfurl still creates the bookmark (with no asset) and reports through
opts.toasts.
SEMANTICS-ASSUMED: the third argument. The consumer casts it at every call
site (as unknown as Parameters<typeof …>[2]), so nothing pins its members;
toasts and msg are the two the consumer's own casts name, and both are
optional so the function is usable with no options at all.
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.