我使用p:editor作为输入:
<p:editor id="editor" value="#{blogUIBean.blogEdit.blogIn}" required="true" style="width:500px"/>
我将此输入显示为:
<h:outputText value="#{blogUIBean.selectedBlog.blogIn}" style="line-height:150%;margin-left:30px;background-color:#e1ecf0;" />
但显示时会选择编辑器选项,如: span style="font-family:宋体,宋体,Helvetica,sans-serif;font-size: 13px;line-height: 18px;background-color: rgb(255,255,255);">Projenin fikir babasıolan Ekmek Sanayiİşverenler Sendikası,sunduklarıprojenin büyük bir karşıığınıve“
为什么会发生这种情况?我如何禁用它们?
发布于 2013-11-21 01:27:58
使用如下属性escape
:
<h:outputText value="#{blogUIBean.selectedBlog.blogIn}" escape="false" style="line-height:150%;margin-left:30px; background-color:#e1ecf0;" />
转义
指示必须对HTML和XML标记中的敏感字符进行转义的标志。默认情况下,此标志设置为"true“。
https://stackoverflow.com/questions/15020535
复制相似问题