-1

event.clipboardData.setData('image/jpg', "mapImage");

How to use this code get image from clipboard And how to send email

  • Perhaps try clarifying your question a little. Users are here to help, but won't do all the work for you... – Simon East Oct 19 '12 at 23:55

2 Answers2

1

I can't quite remember the javascript method, if it is javascript you're using, but whatever it is, it's most likely the getting of the image is as simple as substituting 'set' with 'get':

var img = event.clipboardData.getData("mapImage"); 

As for sending an email, I think it goes something like this:

<button onclick="mailto:fred@example.com">Send Email</button>
a paid nerd
  • 30,702
  • 30
  • 134
  • 179
GenericMeatUnit
  • 477
  • 4
  • 9
0

Despite AFAIK this wasn't possible at the time this question was asked, I want to point out this is possible today, at least in Google Chrome. 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+?

Community
  • 1
  • 1
Mira Weller
  • 2,406
  • 22
  • 27