简体   繁体   English

TinyMCE从单词粘贴无法正常工作

[英]TinyMCE Paste from word not working properly

I have a problem with Paste From Word functionality. 我从Word粘贴功能有问题。 I have an editor and when I click the paste from word button it opens a popup with a textarea . 我有一个编辑器,当我单击“从单词粘贴”按钮时,它将打开一个带有textarea的弹出窗口。 I want to paste my text which contains simple text, an image () and a hyperlink. 我要粘贴包含简单文本,图像()和超链接的文本。 When I'm pasting the text everything seems to be fine but when I click the submit button in order for the editor to get the content it loses the images. 当我粘贴文本时,一切似乎都很好,但是当我单击“提交”按钮以使编辑器获取内容时,它将丢失图像。

From popup I do a 从弹出窗口中我执行

tinymcepopup.editor.execcommand('mceinsertclipboardcontent', false, {content : h, wordcontent : true});

I've tried the paste_data_images: true and put the img to extended_valid_elements but nothing worked. 我已经尝试了paste_data_images: true并将img放到extended_valid_elements但是没有任何效果。

Any ideas? 有任何想法吗?

Thanks in advance. 提前致谢。

Finally, I manage to get it to work. 最后,我设法使其正常工作。 Setting the paste_data_images: true did the trick. 设置paste_data_images: true My problem in the first place was that the application that I was using had an extra file which was overriding my settings, so I changed there and everything works as expected. 首先,我的问题是我正在使用的应用程序有一个额外的文件,该文件会覆盖我的设置,因此我在那里进行了更改,并且一切正常。

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

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