简体   繁体   English

将图像粘贴到 TinyMCE 编辑器中

[英]Paste Image Into TinyMCE Editor

I am looking at ways to Paste an Image into TinyMCE editor, I have been googling it for a while, but couldn't find any related answer.我正在寻找将图像粘贴到 TinyMCE 编辑器中的方法,我已经在谷歌上搜索了一段时间,但找不到任何相关的答案。

I can append an <img> with src content to the Editor(when i paste the image on the page other than inside the editor).我可以将带有 src 内容的<img>附加到编辑器(当我将图像粘贴到编辑器内以外的页面上时)。

I am not able to paste it inside the Editor.我无法将其粘贴到编辑器中。 I am using Javascript and jquery.我正在使用 Javascript 和 jquery。 Has anyone got an idea, how i could do this.有没有人有想法,我怎么能做到这一点。

Enable paste_data_images启用paste_data_images

Setting paste_data_images to "true" will allow the pasted images, while setting it to "false" will disallow pasted images.将 paste_data_images 设置为“true”将允许粘贴图像,而将其设置为“false”将不允许粘贴图像。

You can't do that.你不能那样做。 TinyMCE and any other editor out there are giving you the functionality of creating rich text content. TinyMCE 和任何其他编辑器都为您提供了创建富文本内容的功能。 Displaying an image requires an URL and there is no URL to the image on your machine.显示图像需要一个 URL,而您的机器上没有该图像的 URL。

You need to upload the image to a server.您需要将图像上传到服务器。 You need to be able to access that image through a link.您需要能够通过链接访问该图像。 That link is what you insert into TinyMCE.该链接是您插入 TinyMCE 的内容。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM