paste.js - Read pasted data from the clipboard in JavaScript - OSS Daily

Daily Open Source News for IT Engineer and Designer

Breaking

Home Top Ad

Post Top Ad

Thursday, October 5, 2017

paste.js - Read pasted data from the clipboard in JavaScript


It became HTML5 and the clipboard contents can be accessed to some extent from JavaScript. Uploading a file You can also use drag & drop upload, and even paste in addition to using input (type = file).

Paste.js makes it easier to handle content processed with such a clipboard.

How to use paste.js


Paste is not limited to the input field. It can also be done with ordinary DOM.

Pasting the text. I can complement it properly.
 

For contentEditable, font decoration can also be reflected.

You can paste images as well.

When an image is pasted, it becomes a blob and it is expanded. After that you can draw on Canvas etc and upload it to the server. If it is a desktop it seems convenient to copy and paste normally on a web browser.

paste.js is JavaScript open source software (MIT License).



No comments:

Post a Comment

Post Bottom Ad