Deprecated clipboard api?

When I copy something to the clipboard, in the debugger I keep getting:
“Using deprecated clipboard api. Set useDeprecatedClipboardApi to false”
I’ve searched the docs and the forums on this and I get nothing. Anyone know where and how to set that flag?

I bring up the issue again because I saw the same thing after my first attempt to use it.
Copying works, but this message is displayed.

Code I used: https://developer.adobe.com/photoshop/uxp/2022/guides/uxp_guide/uxp-misc/manifest-v5/#clipboard

idk why issues about clipboard api are ignored. I’ve seen multiple topics about this.
the depreciation message is one thing but it also only supports plain text although docs say it supports other data types.

The log is not relevant for plugin developers and is an unnecessary distraction and possibly a source of confusion as evinced in this thread. useDeprecatedClipboardApi isn’t something that’s available to plugin developers for tweaking and is internal to UXP permission management. As @tomzag has already pointed out, the copying would indeed work (and so shall the subsequent reading). One way to “get rid” of that warning would be to use clipboard.write() instead of the clipboard.writeText() and yes, this warrants an update to the documentation too so that it shouldn’t be directing developers to use APIs that, for reasons internal to UXP, throw up nebulous warnings. Note that the same warning would show up while using the readText() variant too upon trying to read the clipboard content which could be made to “go away” with just read(). Thanks for bringing this up. We shall try to address this at the earliest at both the code and the documentation level.

2 Likes