Interface DocumentPasteProviderMetadata

Provides additional metadata about how a DocumentPasteEditProvider works.

interface DocumentPasteProviderMetadata {
    copyMimeTypes?: readonly string[];
    pasteMimeTypes?: readonly string[];
    providedPasteEditKinds: readonly DocumentDropOrPasteEditKind[];
}

Properties

copyMimeTypes?: readonly string[]

Mime types that prepareDocumentPaste may add on copy.

pasteMimeTypes?: readonly string[]

Mime types that provideDocumentPasteEdits should be invoked for.

This can either be an exact mime type such as image/png, or a wildcard pattern such as image/*.

Use text/uri-list for resources dropped from the explorer or other tree views in the workbench.

Use files to indicate that the provider should be invoked if any files are present in the DataTransfer. Note that DataTransferFile entries are only created when pasting content from outside the editor, such as from the operating system.

providedPasteEditKinds: readonly DocumentDropOrPasteEditKind[]

List of kinds that the provider may return in provideDocumentPasteEdits.

This is used to filter out providers when a specific kind of edit is requested.