Am I missing something basic? I don’t see any way to get the current clipboard contents in a plugin.
Not yet, though for text of course you can have the user paste into a textfield and auto-detect the added text to streamline the interaction flow.
If not text, what type of content are you looking to read from the clipboard?
Yes, just text.
I did think of the auto-detection, but that seemed somewhat less than ideal in terms of the UX.
Any chance we could get an API for clipboard content detection and content capture?
Sadly, this fails entirely due to auto-typographer’s-quoting when pasting text.
I’m trying to paste JSON, and that simple fact mangles it beyond logical repair.
(Yes, I could try replacing all paired typographer’s quotes with straight quotes, but what about such quotes inside text strings? You can’t determine the actual ending of the outer quote, because you could have an unbalanced typographer’s close quote in the JSON string contents.)
Sigh.