#note that this will prompt the user to allow acces to clipboard navigator.clipboard.readText().then(text => { console.log('Clipboard content is: ', text); }) .catch(err => { console.error('Failed to read clipboard contents: ', err); });