admin管理员组文章数量:1024615
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 municate 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 acplish this using JavaScript?
This only needs to be functional on IE5+, but any solutions that might work on IE are wele.
Any help appreciated - let me know in ments if there's any part of this question which isn't clear.
Thanks,
Dom
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 municate 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 acplish this using JavaScript?
This only needs to be functional on IE5+, but any solutions that might work on IE are wele.
Any help appreciated - let me know in ments if there's any part of this question which isn't clear.
Thanks,
Dom
Share Improve this question edited Feb 20, 2009 at 11:05 troelskn 118k27 gold badges134 silver badges156 bronze badges asked Jan 7, 2009 at 15:21 Dominic RodgerDominic Rodger 99.9k37 gold badges203 silver badges217 bronze badges2 Answers
Reset to default 4What 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).
This will work in IE if Chrome Frame is installed: http://strd6./2011/09/html5-javascript-pasting-image-data-in-chrome/
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 municate 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 acplish this using JavaScript?
This only needs to be functional on IE5+, but any solutions that might work on IE are wele.
Any help appreciated - let me know in ments if there's any part of this question which isn't clear.
Thanks,
Dom
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 municate 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 acplish this using JavaScript?
This only needs to be functional on IE5+, but any solutions that might work on IE are wele.
Any help appreciated - let me know in ments if there's any part of this question which isn't clear.
Thanks,
Dom
Share Improve this question edited Feb 20, 2009 at 11:05 troelskn 118k27 gold badges134 silver badges156 bronze badges asked Jan 7, 2009 at 15:21 Dominic RodgerDominic Rodger 99.9k37 gold badges203 silver badges217 bronze badges2 Answers
Reset to default 4What 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).
This will work in IE if Chrome Frame is installed: http://strd6./2011/09/html5-javascript-pasting-image-data-in-chrome/
本文标签: Copypasting image into JavaScript richtext editorStack Overflow
版权声明:本文标题:Copy-pasting image into JavaScript rich-text editor - Stack Overflow 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745610100a2158953.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论