Clipboard
Read and write content from and to the clipboard.
System requirements
Please make sure your local environment uses the following application versions before proceeding.
- Premiere Pro v25.2 or higher
- UXP version v7.1 or higher
- Manifest version v5 or higher
In plugins, you should seek permission for clipboard
access in the manifest.
IMPORTANT: Read about the manifest permissions before you proceed.
Example
JavaScript
manifest
Copied to your clipboardasync function foo() {const clipboard = navigator.clipboard;// Setting content for clipboardclipboard.setContent({ 'text/plain': "Test string to validate clipboard setContent" }).then(() => {console.log("Data successfully set on clipboard");}, (error) => {console.error("Error while setting data on clipboard:", error);});// Reading from clipboard and printingclipboard.getContent().then((result) => {console.log(`Data from clipboard: ${result["text/plain"]}`);}, (error) => {console.error("Error while reading data from clipboard:", error);});}
Copied to your clipboard{"requiredPermissions": {"clipboard": "readAndWrite"}}
Additional notes
- Set the permission to "read" if your script/plugin only intends to read from the clipboard.
Reference material
- Clipboard APIs