component-clipboard
Clipboard API wrapper
Last updated 6 years ago by tootallnate .
Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install component-clipboard 
SYNC missed versions from official npm registry.

Clipboard

Clipboard library.

Installation

$ component install component/clipboard

Example

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');
});

API

Clipboard#bind()

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

Clipboard#unbind()

Unbind event handlers.

Links

License

MIT

Current Tags

  • 0.1.7                                ...           latest (6 years ago)

2 Versions

  • 0.1.7                                ...           6 years ago
  • 0.1.6                                ...           7 years ago

Copyright 2014 - 2016 © taobao.org |