简体   繁体   English

从ms word复制和粘贴后ckeditor格式看起来不太好

[英]ckeditor formatting looks not good after copy and paste from ms word

I have DRUPAL website.I am using ck-editor but when user copy data with images from ms-word and paste into ck-editor then formatting not retains/maintains like ms word and after submit preview looks not good.In ms word file, client have data with images. 我有DRUPAL网站。我正在使用ck-editor,但是当用户从ms-word中复制带有图像的数据并将其粘贴到ck-editor中时,格式化不会像ms word一样保留/保持不变,并且在提交预览后看起来不太好。在ms word文件中,客户有图像数据。 Suggest me which editor is good for copy and paste from ms word to editor.I want editor which retains formatting position like ms word. 建议我哪个编辑器适合从ms word复制到粘贴。我想要保留像ms word这样的格式化位置的编辑器。

Did you do a regular copy-paste? 您是否定期复制粘贴? CKEditor has a "Paste from Word" button that will take out most (all?) of the worst Word formatting and leave the rest. CKEditor有一个“从Word粘贴”按钮,它将删除大多数(全部?)最差的Word格式,其余部分保留。 Edit the toolbar to remove the other paste buttons and your users can always use Paste from Word. 编辑工具栏以删除其他粘贴按钮,您的用户可以始终使用从Word粘贴。

You can configure your toolbar like this. 您可以像这样配置工具栏。

config.toolbar = [   
    .....,
    { name: 'clipboard', items: [ 'Cut', 'Copy', 'Paste', 'PasteFromWord', ..... ] },
    .....
];

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

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