@tauri-apps/plugin-clipboard-manager
Read and write to the system clipboard.
Functions
readText()
readText(): Promise< string >Gets the clipboard content as plain text.
Example
import { readText } from '@tauri-apps/plugin-clipboard-manager';const clipboardText = await readText();Since
2.0.0
Returns
Promise< string >
Source: index.ts:51
writeText()
writeText(text, opts?): Promise< void >Writes plain text to the clipboard.
Example
import { writeText, readText } from '@tauri-apps/plugin-clipboard-manager';await writeText('Tauri is awesome!');assert(await readText(), 'Tauri is awesome!');Since
2.0.0
Parameters
| Parameter | Type |
|---|---|
text | string |
opts? | object |
opts.label? | string |
Returns
Promise< void >
A promise indicating the success or failure of the operation.
Source: index.ts:28
© 2024 Tauri Contributors. CC-BY / MIT