6

I found this question, but the question is about how to get an image from the clip board into a wyziwyg editor!

My question is "How can I paste an image from the clipboard into a field (what field is not that big issue as long as it works)", and then sent to the server.

Jira has this functionality, so it should be possible!

Any ideas on how to do this?

Just to explain the complete workflow; I would like to have a plave to multi upload images, where the paste from clipboard also is an option. The upload will be some ajax of some sort, bt is not important in this context!

Thanks

Community
  • 1
  • 1
dr. squid
  • 786
  • 2
  • 6
  • 14
  • 4
    My guesses are that you'd need to use a JAVA or Flash/Flex application to get this to work as HTML and the browsers don't support this directly. – Alistair May 29 '10 at 09:42
  • btw the link http://lassebunk.dk/2009/08/04/clipboard-java-applet/ in the post you provide is exactly what you are looking for! it also include source code!!!! – Luca Filosofi May 29 '10 at 10:25
  • Whatever you do, use progressive-enhancement over a standard HTML file upload field, so that those of use who don't run whatever plugin you choose can still upload a plain image file. – bobince May 29 '10 at 12:52
  • possible duplicate of [Paste image from clipboard to web form](http://stackoverflow.com/questions/10251528/paste-image-from-clipboard-to-web-form) – Andrew Whitaker Oct 20 '12 at 13:19

1 Answers1

9

UPDATED 25/11/2014

As Alistar say you can't do this with only javascript and html, but wait, is not so simple, depending on what you need you can try different way!

..clipboard method only works to put strings on the clipboard. For other types of data, such as URLs or images, you will need to use a more complex method...

HTML5

  1. http://caniuse.com/#feat=clipboard
  2. https://developer.mozilla.org/en-US/docs/Web/API/ClipboardEvent

Flex / Flash / ActionScript

  1. http://www.flexets.com/show-image-from-clipboard
  2. http://upog.wordpress.com/2010/02/14/copy-and-paste-in-flex-web-application/

JAVA

  1. http://www.java2s.com/Code/Java/2D-Graphics-GUI/SendingImageObjectsthroughtheClipboard.htm
  2. http://lassebunk.dk/2009/08/04/clipboard-java-applet/
  3. http://www.devdaily.com/java/java-clipboard-image-copy-paste

ActiveX

Clipboard ActiveX for Image Copy/Paste into Web Forms

Community
  • 1
  • 1
Luca Filosofi
  • 30,905
  • 9
  • 70
  • 77