Hi there,
I’m using the clipboard API as such:
const clipboard = require("clipboard");
function copyPast() {
application.editDocument((selection, documentRoot) => {
clipboard.copyText("hello");
});
}
When the function is called from an onClick event, I’m seeing this error:
Plugin TypeError: clipboard.copyText is not a function
It seems that the import is leading to the ClipboardJS package in node module (deleting it doesn’t change anything).
If you can shed some light here, I’d appreciate your help, thanks!