tiberiumihai / paste-image

Cross-browser pasting of images

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

paste-image Build Status Coverage Status Dependency Status

Selenium Test Status

Cross-browser pasting of images

A simple example that works in all major browsers.

Example

// Listen for all image paste events on a page
pasteImage.on('paste-image', function (image) {

  // Display the image by appending it to the end of the body
  document.body.appendChild(image);

});

Install via NPM

npm install paste-image

Why?

It's 2016 and Chrome is the only browser to properly implement the Clipboard API. Let's wrap up some workarounds and provide an easy way to provide cross-browser image pasting.

About

Cross-browser pasting of images

License:MIT License


Languages

Language:JavaScript 90.8%Language:HTML 5.9%Language:Shell 3.3%