0

I saw Liferay's WYSIWYG editor has option to copy content from Word. But I notice that the formating (especially headings) don't match and the images are not copied. Is it a known issue?

Does Liferay support integration with any WYSIWYG editor in which I can copy content from word as is without losing the formatting and images?

4

1 回答 1

2

这是一个已知问题,将在 Liferay 7.0.0 M1 中修复 - 请参阅https://issues.liferay.com/browse/LPS-29493

Liferay 使用CK Editor,可以复制Word 内容,包括样式。CK Editor 需要配置为保留样式。选项包括:

要保留 Liferay 6.2 中的样式,您需要创建一个 JSP 挂钩并自定义编辑器的配置。

要在没有钩子的情况下测试功能,您可以打开任何 Web 内容文章并修改当前 CK Editor 实例的配置。在浏览器的 JavaScript 控制台中运行以下命令:

CKEDITOR.instances['_15_articleContent'].config.pasteFromWordRemoveStyles = false;
CKEDITOR.instances['_15_articleContent'].config.pasteFromWordRemoveFontStyles = false;

注意复制文档的 HTML 源 - 会有很多内联样式。它现在可能正是您想要的。您可能需要一些额外的处理来清理文档。那将意味着另一个钩子。

于 2015-02-25T07:49:43.690 回答