Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js get copied text

function updateClipboard(newClip) {
  navigator.clipboard.writeText(newClip).then(function() {
    /* clipboard successfully set */
  }, function() {
    /* clipboard write failed */
  });
}
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #js #copied #text
ADD COMMENT
Topic
Name
9+3 =