从div中包含WYSIWYG的内容

时间:2012-01-23 10:02:46

标签: java liferay freemarker

如何在div中包装用WYSIWYG(CKEditor)编写的内容(HTML)。

我有一个变量$ {SomePortlet.journalArticle.description} e.g。

<div class="wysiwyg">${SomePortlet.journalArticle.description}</div>

不是解决方案,因为我需要在不同的portlet中包含许多元素。

是否有任何配置选项,如'wysiwyg编辑器输出包装'?感谢。

1 个答案:

答案 0 :(得分:2)

要在页面上的div中显示Liferay日记文章(即您通过Web内容WYSIWYG编辑器添加的信息),请使用以下内容:

<div class="yourCSSClass">
    <liferay-ui:journal-article articleId="${youPasstheArticleId}" groupId="${youPasstheGroupId}" />
</div>

这会回答你的问题吗?

相关问题