With flash on the way out in many environments (iPhone, Android, IE10, etc...), is there any new solution forthcoming in any browsers that will allow a safe copy of informat
I have created a pure JavaScript solution called clip-j. Here it is. Basically what it does is it takes advantage of document.execCommand('copy');
with a few other commands that make it so you don't see anything. Here's the code:
function clip(text) {
var copyElement = document.createElement('input');
copyElement.setAttribute('type', 'text');
copyElement.setAttribute('value', text);
copyElement = document.body.appendChild(copyElement);
copyElement.select();
document.execCommand('copy');
copyElement.remove();
}