Function tauri_sys::clipboard::write_text
source · pub async fn write_text(text: &str) -> Result<(), Error>
Expand description
Writes plain text to the clipboard.
§Example
use tauri_api::clipboard::{write_text, read_text};
write_text("Tauri is awesome!").await;
assert_eq!(read_text().await, "Tauri is awesome!");
Requires allowlist > clipboard > writeText
to be enabled.