5

I see that this has been discussed a few times before, but that was 2010 and before. Now i was writing a new email in my gmail client and noted that i could just paste an image into the mail body / webform.

I was quite happy to see this as i have been looking for a similar solution for a while.

Can anyone provide some details on how this works? Is it Flash? Or some JavaScript?

Tys
  • 3,592
  • 9
  • 49
  • 71
  • I found this similar question which may help you http://stackoverflow.com/questions/2934520/how-can-i-paste-an-image-from-the-clipboard-into-a-web-form – Rrjrjtlokrthjji Apr 20 '12 at 18:29
  • Another similar question with some good answers: http://stackoverflow.com/questions/60455/take-a-screenshot-of-a-webpage-with-javascript – Simon East Oct 19 '12 at 23:50

3 Answers3

4

It is html5 + javascript, and or flash (depends on the browser) This link should get you strated: http://strd6.com/2011/09/html5-javascript-pasting-image-data-in-chrome/

A little warning though, this only works in chrome as of now.

mpx
  • 199
  • 2
  • 9
  • Too bad..most of my clients dont use Chrome. But, hearing that HTML5 has possibilities like this makes me a bit more happy. – Tys Apr 20 '12 at 19:07
2

Here is another alternative, inspired by Github's image paste. Seems to work with jQuery.

https://github.com/Rovak/InlineAttachment

micho
  • 2,196
  • 2
  • 21
  • 26
1

From 2011 (which might be a bit out of date now) this link might be a great starting point for Chrome + Firefox:
http://joelb.me/blog/2011/code-snippet-accessing-clipboard-images-with-javascript/

(from the guy who built Pasteboard)

With IE (if anyone still needs to support IE) it sounds like you might need to resort to HTA, ActiveX, Flex, or Java. Have a look here:
Take a screenshot of a webpage with JavaScript?

Simon East
  • 55,742
  • 17
  • 139
  • 133