Paste images in pasteimg browser jquery plugin

Source: Internet
Author: User

Pasteimg is a jquery plugin that allows you to paste images in your browser, compatible with Chrome, Firefox, IE11, and other browsers that use these kernels, such as the nationally renowned 360 browser.

Pasteimg can identify images that are copied directly from the browser, as well as images in the rich text that you copy. Only the content copied in the browser can be identified, and the images copied in the operating system are not recognized.

PASTEIMG relies on jquery and is easy to use, after introducing jquery and Paste.image.js, it is called as follows:

1 //call the Pasteimage method on a DOM element that needs to listen for paste events2 //calling the Pasteimage method requires passing in a callback parameter3 //Once a picture is found in the pasted content, it is called callback4 //when callback is called, an array is passed in, containing all the pictures5 //The plugin will convert the image to Base64 encoding as much as possible, but is subject to cross-domain restrictions and, if not converted, will return the absolute URL path of the picture6$ ("#container"). Pasteimage (function(IMGs) {7   //IMGs is an array that contain all image and you can do something ...8});

View on GitHub

Have questions welcome feedback!

Paste images in pasteimg browser jquery plugin

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.