Node.js examples for Environment:Clipboard
Copy text to system Clipboard
function copyTextToClipboard(text) { var copyFrom = document.createElement("textarea"); var body = document.getElementsByTagName('body')[0]; copyFrom.textContent = text;//from www . j a v a2 s . co m body.appendChild(copyFrom); copyFrom.select(); document.execCommand('copy'); body.removeChild(copyFrom); }