Clipboard library.
$ component install component/clipboard
var Clipboard = require('clipboard');
var clip = new Clipboard(window);
clip.on('paste', function(){
console.log('paste');
});
clip.on('cut', function(){
console.log('cut');
});
clip.on('copy', function(e){
console.log('copy');
});
clip.on('paste text', function(text){
console.log('paste "%s"', text);
});
clip.on('paste file', function(file){
file.toDataURL(function(err, url){
var img = new Image;
img.src = url;
document.body.appendChild(img);
});
});
Bind event handlers. This is done for you in the constructor.
Unbind event handlers.
MIT