-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
37 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
paste.js | ||
===== | ||
|
||
paste.js is an interface to read from clipboard data in different browsers. Currenttly only tested under: | ||
|
||
* IE 11 (Windows 7) | ||
* Chrome 32 (Windows 7 / OSX) | ||
* Firefox 26 (Windows 7 / OSX) | ||
* Opera 12.15 (OSX) (text only) | ||
|
||
usage | ||
----- | ||
|
||
``` | ||
// jQuery needed | ||
paste = $.paste(); | ||
paste.on('pasteImage', function (ev, data){ | ||
console.log("dataURL: " + data.dataURL) | ||
}); | ||
paste.on('pasteText', function (ev, data){ | ||
console.log("text: " + data.text) | ||
}); | ||
paste.focus(); // it's actually a hidden div element | ||
// ... when you don't need it anymore | ||
paste.remove(); | ||
``` | ||
|
||
more | ||
----- | ||
|
||
see [this example](http://puffant.github.io/paste.js/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "paste.js", | ||
"version": "0.0.0", | ||
"version": "0.0.1", | ||
"authors": [ | ||
"Michael Yin <[email protected]>" | ||
], | ||
|
@@ -10,7 +10,10 @@ | |
"node_modules", | ||
"bower_components", | ||
"test", | ||
"tests" | ||
"tests", | ||
"paste.coffee", | ||
"Makefile", | ||
"index.html" | ||
], | ||
"dependencies": { | ||
"jquery": "~2.1.0" | ||
|