wixWindow.copyToClipboard("Text to copy!") 6 .then( () => { 7 // handle case where text was copied 8 } ) 9 .catch( (err) => { 10 // handle case where an error occurred 11 } );