0.1.5 • Published 11 years ago

clipboard-component v0.1.5

Weekly downloads
29
License
-
Repository
-
Last release
11 years ago

Clipboard

Clipboard library.

Installation

$ component install component/clipboard

Example

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

Clipboard#bind()

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

Clipboard#unbind()

Unbind event handlers.

Links

License

MIT

0.1.5

11 years ago

0.1.4

11 years ago

0.1.3

11 years ago

0.1.2

11 years ago

0.1.1

11 years ago

0.1.0

11 years ago

0.0.3

11 years ago

0.0.2

12 years ago

0.0.1

12 years ago