component-clipboard

Clipboard API wrapper

Clipboard

Clipboard library.

$ component install component/clipboard
var Clipboard = require('clipboard');
var clip = new Clipboard(window);
 
clip.on('paste', function(e){
  e.items.forEach(function(item){
    console.log(item);
  });
});
 
clip.on('cut', function(){
  console.log('cut');
});
 
clip.on('copy', function(e){
  console.log('copy');
});

Bind event handlers. This is done for you in the constructor.

Unbind event handlers.

MIT