SheetXL - v0.3.20
    Preparing search index...

    A clipboard target is an interface will read items from the clipboard.

    interface Target<T = any, E extends HTMLElement = HTMLElement> {
        doPaste?: (
            item: ReferenceableClipboard.ReferenceItem<T>,
            options: ReferenceableClipboard.PasteOptions,
        ) => boolean | Promise<boolean>;
        element: () => E;
        importFromExternal?: (
            items: ReferenceableClipboard.NativeItems,
            options?: ReferenceableClipboard.CopyOptions,
        ) =>
            | ReferenceableClipboard.ReferenceItem<T>
            | Promise<ReferenceableClipboard.ReferenceItem<T>>;
    }

    Type Parameters

    • T = any
    • E extends HTMLElement = HTMLElement
    Index

    Properties

    doPaste?: (
        item: ReferenceableClipboard.ReferenceItem<T>,
        options: ReferenceableClipboard.PasteOptions,
    ) => boolean | Promise<boolean>

    If this is not specified then native paste will still be attempted.

    element: () => E

    A method that allows or focus to be called. (and supports an addEventListener('focus'))

    importFromExternal?: (
        items: ReferenceableClipboard.NativeItems,
        options?: ReferenceableClipboard.CopyOptions,
    ) =>
        | ReferenceableClipboard.ReferenceItem<T>
        | Promise<ReferenceableClipboard.ReferenceItem<T>>

    Creates a ReferenceableClipboardItem from native clipboard items (text, html, or images). This is used to import external clipboard data into an 'internal clipboard' representation.

    Type declaration

    Error If an error occurs during the creation of the ReferenceableClipboardItem. The error will be caught and displayed to the user.