Paste an image from clipboard using JavaScript

kani picture kani · Jan 29, 2009 · Viewed 90.2k times · Source

How do we paste an image from clipboard into a custom rich text editor using javascript? (ctrl+c and ctrl+v or a snapshot).

Has anyone used Ajax's rich text editor? Does pasting an image from clipboard to Ajax RTE work?

Please do share your thoughts!

Thanks!

Answer

Mira Weller picture Mira Weller · Oct 16, 2011

Because this question still often shows up in Google's search results, I want to point out this is possible today, at least in Google Chrome (2011) in all modern browsers (2018). They implemented it to use in GMail, but it is available for all websites.

How does the paste image from clipboard functionality work in Gmail and Google Chrome 12+?