admin管理员组文章数量:1415491
I'm looking for a tinymce plugin or an external jquery solution easy to integrate into tinymce that allows drag and drop image uploading and insertion in a tinymce textarea, either directly dropping the image in the textarea itself or in a defined "drop zone", something similar to the new media upload button in Wordpress or, even better, without showing any dialog.
I don't want extra functions like a gallery browser or image repository management, already tried several plugins that do that and the customer finds it too tedious and plicated, he just wants do drop the image and forget about it, as he's not going to use that image ever again.
I'm looking for a tinymce plugin or an external jquery solution easy to integrate into tinymce that allows drag and drop image uploading and insertion in a tinymce textarea, either directly dropping the image in the textarea itself or in a defined "drop zone", something similar to the new media upload button in Wordpress or, even better, without showing any dialog.
I don't want extra functions like a gallery browser or image repository management, already tried several plugins that do that and the customer finds it too tedious and plicated, he just wants do drop the image and forget about it, as he's not going to use that image ever again.
Share Improve this question asked Dec 13, 2011 at 18:11 BorgtexBorgtex 3,2551 gold badge21 silver badges28 bronze badges 5- Hi Borgtex. Did you find a solution? I am looking for something similar. – rassom Commented Jul 12, 2012 at 15:53
- 2 I had to do something like this. My solution was to submit the text, with the base64 images, to the server, and then server side, extract the base64 uris from the Dom, write them to a file, replace the SRC with the path to the newly created file, then submit the text to the database. – chiliNUT Commented Jun 25, 2014 at 5:49
- @chiliNUT That's an interesting solution. Did you have ongoing success with this? What about extremely large images, were there any issues there? – Manachi Commented Apr 26, 2016 at 5:45
- @Manachi since it's base 64 encoded, the upload size ends up being roughly 133% larger than the image. that said, it wasn't an issue for me, as the main use case was for images exported from photoshop at reasonable Web sizes (under 1mb). For large images, and really in general, I would remend responsivefilemanager. fantastic tinymce plugin – chiliNUT Commented Apr 27, 2016 at 0:22
- Current TinyMCE es with such functionality: tinymce./docs/get-started/upload-images – jayarjo Commented Dec 12, 2016 at 19:50
1 Answer
Reset to default 2What browsers do you need to support?
Have you tried just dragging and dropping an image into a TinyMCE text area? It will encode the image in base64 and use that encoding as the value for the src attribute of the image tag. Since the customer is "not going to use that image ever again" that might be a temporary solution, especially if the images are very small like logos and the like.
Alternatively, many people have success with https://github./valums/file-uploader for drag and drop upload functionality, but I'm not sure how you would integrate it with TinyMCE.
本文标签: javascriptDrag and drop image amp upload plugin for tinymceStack Overflow
版权声明:本文标题:javascript - Drag and drop image & upload plugin for tinymce - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745192174a2646962.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论