clipboard API

Hint

The clipboard API is inherited from Firefox, and its primary documentation is maintained by Mozilla at MDN. Thunderbird implements only the subset of functions, events, and types listed here. The MDN pages may provide further details and examples, but they may also reference features that are not supported in Thunderbird.

Offers the ability to write to the clipboard. Reading is not supported because the clipboard can already be read through the standard web platform APIs.

Permissions

The following permissions influence the behavior of the API. Depending on which permissions are requested, additional methods might be available, or certain data may be included in responses.

Hint

Request permissions only when needed. Unnecessary requests may result in rejection during ATN review.

clipboardWrite

clipboardWrite

Input data to the clipboard.

Note

The permission clipboardWrite is required to use messenger.clipboard.*.

Functions

setImageData(imageData, imageType)

– [Added in TB 57]

Copy an image to the clipboard. The image is re-encoded before it is written to the clipboard. If the image is invalid, the clipboard is not modified.

Parameters

imageData

imageData

The image data to be copied.

imageType

imageType

(string)

The type of imageData.

Supported values:

jpeg

jpeg

png

png

Required permissions

  • clipboardWrite