3

I'm looking for a rich-text editor control that has some way of allowing users to copy-paste images into it, a la Google Mail. I guess I'm hoping there's some way to communicate the binary contents of an image on the clipboard to the browser (and perhaps store these contents in a hidden element somewhere that I can access). If you can't think of a rich-text editor with this functionality included - can anyone think of a way to accomplish this using JavaScript?

This only needs to be functional on IE5+, but any solutions that might work on IE are welcome.

Any help appreciated - let me know in comments if there's any part of this question which isn't clear.

Thanks,

Dom

2 Answers 2

4

What happens in Google mail, is that when you drag an image into a richtext area, it receives a dragdrop event with the URL of the image. If the image is online, you can have javascript capture this and insert an <img> tag. It won't work if the image is on the users file-system though (For security reasons).

Sign up to request clarification or add additional context in comments.

Comments

0

This will work in IE if Chrome Frame is installed: http://strd6.com/2011/09/html5-javascript-pasting-image-data-in-chrome/

1 Comment

Not working in all major browsers like Firefox, Safari. Is there any updates?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.