Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript get clipboard contents

#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);
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #clipboard #contents
ADD COMMENT
Topic
Name
6+5 =