[英]How to insert image through textarea or html editor?
i have textarea where user can input some text, and this works but the problem arises when he wants to insert the image...我有文本区域,用户可以在其中输入一些文本,这有效,但是当他想插入图像时出现问题...
if he put this for example in textarea (Thumbnail image (linked) code)如果他把它放在例如 textarea 中(缩略图图像(链接)代码)
<a href="http://www.ultraimg.com/image/1V6n"><img src="http://ultraimg.com/images/2016/08/11/1V6n.md.jpg" alt="1V6n.jpg" border="0" /></a>
when he clicks save button, after that it show the same img code, but there is no image...当他点击保存按钮时,它显示相同的 img 代码,但没有图像......
so i started to use ckeditor but the situation is the same....所以我开始使用 ckeditor 但情况是一样的....
so please tell what i need to ?所以请告诉我需要什么?
Thank you谢谢
Instead oftextarea , you may use contentEditable .您可以使用contentEditable代替textarea 。
For limitations and usage take a look to the reported links.有关限制和用法,请查看报告的链接。
This is an example:这是一个例子:
<div contenteditable="true"> <a href="http://www.ultraimg.com/image/1V6n"><img src="http://ultraimg.com/images/2016/08/11/1V6n.md.jpg" alt="1V6n.jpg" border="0" /></a> </div>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.