Expand description
Read and write to the system clipboard.
The APIs must be added to tauri.allowlist.clipboard in tauri.conf.json:
{
"tauri": {
"allowlist": {
"clipboard": {
"all": true, // enable all Clipboard APIs
"writeText": true,
"readText": true
}
}
}
}
It is recommended to allowlist only the APIs you use for optimal bundle size and security.
Functions§
- Gets the clipboard content as plain text.
- Writes plain text to the clipboard.