I want to be able to copy an image from clipboard, specifically screenshots, and paste them right into a rich text editor, and/or have that file uploaded. We only use chrome so
I believe Na7coldwater is correct. The event.clipboardData
is being utilised. Please see the following proof of concept:
Gmail uploads the image via XMLHttpRequest
instead of embedding it directly as a data URL. A search on Google or SO for drag & drop file uploads should reveal how this can be achieved.
Please bare in mind that this is just a proof of concept. Error handling and browser/feature detection code is not included.
Hope this helps!