Read and write to the system clipboard.
Clears the clipboard.
- Android: Only supported on SDK 28+. For older releases we write an empty string to the clipboard instead.
Promise
<void
>
2.0.0
Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/clipboard-manager/guest-js/index.ts#L144
Gets the clipboard content as Uint8Array image.
- Android / iOS: Not supported.
Promise
<Image
>
2.0.0
Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/clipboard-manager/guest-js/index.ts#L98
Gets the clipboard content as plain text.
Promise
<string
>
2.0.0
Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/clipboard-manager/guest-js/index.ts#L46
- Writes HTML or fallbacks to write provided plain text to the clipboard.
- Android / iOS: Not supported.
Parameter | Type |
---|
html | string |
altHtml ? | string |
Promise
<void
>
A promise indicating the success or failure of the operation.
2.0.0
Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/clipboard-manager/guest-js/index.ts#L123
Writes image buffer to the clipboard.
- Android / iOS: Not supported.
Promise
<void
>
Writes plain text to the clipboard.
Parameter | Type |
---|
text | string |
opts ? | object |
opts.label ? | string |
Promise
<void
>
A promise indicating the success or failure of the operation.
2.0.0
Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/clipboard-manager/guest-js/index.ts#L27
© 2024 Tauri Contributors. CC-BY / MIT