0.0.5 • Published 6 years ago

clipboard-paste v0.0.5

Weekly downloads
4
License
ISC
Repository
-
Last release
6 years ago

clipboard-paste

NPM version NPM travis codebeat badge codecov

clipboard paste

Introduction

Encapsulation js paste event

Usage

ES6

import ClipboardPaste from 'clipboard-paste';

UMD

use ./dist/clipboard-paste.js

Methods

notice

  • All methods prevents the default event
  • You may need addEvtPaste4Text and addEvtPaste4Image, when you want to filter the paste-value-type
  • You need simulate the default event, when you want to selectively processing paste value
addEvtPaste
addEvtPaste4Text
addEvtPaste4Image
obj = {
    kind: String,
    type: String,
    content: Blob/String
}

addEvtPaste(el, callback)

el              selector
callback(e, [obj])

addEvtPaste4Text(el, callback)

el              selector
callback(e, [obj])

addEvtPaste4Image(el, callback)

el              selector
callback(e, o)

o = {
    name: '',
    blob: File
}
0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago