TLClipboardPasteRawInfo

See source code

Raw clipboard paste payload, before tldraw parses clipboard contents into TLExternalContent.

  • native-event: from the paste event — clipboardData is available synchronously (unlike async navigator.clipboard.read()). - clipboard-read: from an explicit navigator.clipboard.read() call — only ClipboardItem[] exists (no DataTransfer).
type TLClipboardPasteRawInfo =
  | {
      readonly clipboardData: DataTransfer | null;
      readonly editor: Editor;
      readonly event: ClipboardEvent;
      readonly point: undefined | VecLike;
      readonly source: "native-event";
    }
  | {
      readonly clipboardItems: readonly ClipboardItem[];
      readonly editor: Editor;
      readonly point: undefined | VecLike;
      readonly source: "clipboard-read";
    };
Prev
TLClickState
Next
TLCompleteEvent