| Crates.io | tauri-plugin-clipboard-next |
| lib.rs | tauri-plugin-clipboard-next |
| version | 0.1.4 |
| created_at | 2025-12-29 00:49:43.107113+00 |
| updated_at | 2026-01-05 09:27:53.837467+00 |
| description | Tauri 2 clipboard plugin: read/write/listen to clipboard (text/rtf/html/image/files) on Windows/macOS/Linux/iOS. |
| homepage | https://github.com/zhoushi1/tauri-plugin-clipboard-next |
| repository | https://github.com/zhoushi1/tauri-plugin-clipboard-next |
| max_upload_size | |
| id | 2009670 |
| size | 260,222 |
Tauri 2 clipboard plugin: read/write/listen to clipboard (text/image/RTF/HTML/files) on Windows/macOS/Linux/iOS.
PNG format)file-uri-list format)| Platform | Supported |
|---|---|
| Windows | ✅ |
| macOS | ✅ |
| Linux | ✅ |
| iOS(Beta) | ✅ |
| Android | 🚧 |
cargo add tauri-plugin-clipboard-next
You can install the JavaScript Guest bindings using your preferred JavaScript package manager:
pnpm add tauri-plugin-clipboard-next-api
src-tauri/src/lib.rs
pub fn run() {
tauri::Builder::default()
+ .plugin(tauri_plugin_clipboard_next::init())
.run(tauri::generate_context!())
.expect("error while running tauri application");
}
src-tauri/capabilities/default.json
{
...
"permissions": [
...
+ "clipboard-next:default"
]
}
Afterwards all the plugin's APIs are available through the JavaScript guest bindings:
import { startWatch, onClipboardChange } from 'tauri-plugin-clipboard-next-api';
await startWatch();
const unlisten = await onClipboardChange((clipboard) => {
console.log('Clipboard changed:', clipboard);
});
// Later, to stop listening
unlisten();
| Method | Description |
|---|---|
startWatch |
Start listening for clipboard changes |
stopWatch |
Stop listening for clipboard changes |
hasText |
Check if the clipboard contains plain text |
hasRtf |
Check if the clipboard contains rich text |
hasHtml |
Check if the clipboard contains html |
hasImage |
Check if the clipboard contains an image |
hasFiles |
Check if the clipboard contains files |
readText |
Read plain text from the clipboard |
readRtf |
Read rich text from the clipboard |
readHtml |
Read html from the clipboard |
readImage |
Read image from the clipboard |
readFiles |
Read file paths from the clipboard |
writeText |
Write plain text to the clipboard |
writeRtf |
Write rich text to the clipboard |
writeHtml |
Write html content to the clipboard |
writeImage |
Write an image to the clipboard from a file path |
writeFiles |
Write file paths to the clipboard |
clear |
Clear the clipboard contents |
getFilePath |
Get the file path for clipboard operations |
readClipboard |
Read all available content from the clipboard |
onClipboardChange |
Listen for clipboard changes |
git clone https://github.com/zhoushi1/tauri-plugin-clipboard-next.git
pnpm install
pnpm build
cd examples/tauri-app
pnpm install
pnpm tauri dev