Closed hakoptak closed 7 months ago
It doesn't clear clipboard after read. You can simply write empty data to clipboard to overwrite existing data.
Use the writeText
function.
Thanks for your suggestion.
If calling writeText()
with empty data also clears any image or file path data then it is a workable solution (though an explicit clear()
function would make the API more comprehensible).
@hakoptak Yes writing an empty string to clipboard should clear image and text data. But if you have a clipboard history manager running, it will still keep track of the old clipboard data.
I could add a clear()
, it's pretty simple. I will let you know when it's done.
Thanks for following up and thanks for willing to add this functionality.
Done. https://github.com/CrossCopy/tauri-plugin-clipboard/pull/16 Used arboard's clear method instead of write text. Should be the same things.
Hi, thanks for this wonderful clipboard plugin.
Would it be possible to add a Clear() function to it? Or does it automatically clear after reading its contents?