component-clipboard

    0.1.7 • Public • Published

    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

    Install

    npm i component-clipboard

    DownloadsWeekly Downloads

    2

    Version

    0.1.7

    License

    none

    Last publish

    Collaborators

    • defunctzombie
    • dfcreative
    • tootallnate
    • tjholowaychuk
    • rauchg
    • retrofox
    • coreh
    • forbeslindesay
    • kelonye
    • mattmueller
    • yields
    • anthonyshort
    • jongleberry
    • ianstormtaylor
    • cristiandouce
    • swatinem
    • stagas
    • amasad
    • juliangruber
    • calvinfo
    • dominicbarnes
    • timoxley
    • jonathanong
    • queckezz
    • nami-doc
    • clintwood
    • thehydroimpulse
    • stephenmathieson
    • trevorgerhardt
    • timaschew
    • hughsk