Answers for "nodejs copy image to clipboard"

11

js copy text to clipboard

function copy() {
  var copyText = document.querySelector("#input");
  copyText.select();
  document.execCommand("copy");
}

document.querySelector("#copy").addEventListener("click", copy);
Posted by: Guest on September-17-2019
1

js copy image to clipboard

// Copies the image as a blob to the clipboard (PNG only)
navigator.clipboard.write([
  new ClipboardItem({
    [blob.type]: blob,
  }),
])
Posted by: Guest on September-30-2021

Code answers related to "nodejs copy image to clipboard"

Code answers related to "Javascript"

Browse Popular Code Answers by Language