我使用 primefaces 文本编辑器允许在使用 jsf 开发的论坛应用程序中创建内容。如果用户在 nore noreferrer“> text Editor 用< h:outputText值=“#{post.content}” evase =“ false”/> ,包含代码的部分显示为纯文本而不是代码, 。
primefaces未格式化的primefaces text Editor代码
从文本编辑器中生成的代码是:
<pre class="ql-syntax" spellcheck="false"><video>
<source src="video1.mp4" type='video/mp4; />
<video>
</pre>
调查后,似乎未应用文本编辑器中代码部分的“ QL-Syntax ”。
如何将文本编辑器中引入的代码部分显示为格式化代码?
感谢您的帮助。
I use Primefaces Text editor to allow the creation of content in a Forum application developed with JSF. If the user introduces code in the Text editor, it is displayed correctly in the Text editor but when displaying the content with <h:outputText value="#{post.content}" escape="false"/>, the part that contains the code is displayed as plain text and not as code.
Primefaces Text editor code not formatted
The code generated from Text editor is:
<pre class="ql-syntax" spellcheck="false"><video>
<source src="video1.mp4" type='video/mp4; />
<video>
</pre>
After investigation, it appears that the "ql-syntax" style of the code part in Text Editor is not applied.
How can i display the code part introduced in the Text editor as being formatted code ?
Thanks for help.
发布评论
评论(1)
我找到了面临同样问题的人的解决方案。
有必要将 outputText 放在以下格式的div中,以便能够在
I found the solution for those facing the same problem.
It is necessary to put the outputText in divs of the following format to be able to apply the style of Text editor outside Text editor itself .