clipboard-paste
v0.0.5
Published
clipboard paste
Downloads
13
Readme
clipboard-paste
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
andaddEvtPaste4Image
, 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
}