CKEditor和Freemarker显示原始html
我正在尝试将CKeditor集成到JForum中。 我可以用CKEditor写文章,但当我向访问者展示它时,它会显示原始html,而不是相应地呈现它 我看到的是这个,而不是应用html和样式的材料CKEditor和Freemarker显示原始html,ckeditor,wysiwyg,freemarker,Ckeditor,Wysiwyg,Freemarker,我正在尝试将CKeditor集成到JForum中。 我可以用CKEditor写文章,但当我向访问者展示它时,它会显示原始html,而不是相应地呈现它 我看到的是这个,而不是应用html和样式的材料 <h1>p> tags showing on frontend with ckeditor</h1> <div> <div><span style="font-family:myriad pro,trebuchet ms,arial,s
<h1>p> tags showing on frontend with ckeditor</h1>
<div>
<div><span style="font-family:myriad pro,trebuchet ms,arial,sans-serif; font-size:16px">Hi,</span><br />
<br />
<span style="font-family:myriad pro,trebuchet ms,arial,sans-serif; font-size:16px">I have installed CKeditor which does work fine on one page but on others when I submit my text it displays a <p> tag on the frontend of the website.</span><br />
<br />
它显示了类似于
<h1>p> tags showing on frontend with ckeditor</h1> <br /> <br />
<div> <br /> <div><span style="font-family:myriad pro,trebuchet
ms,arial,sans-serif; font-size:16px">Hi,</span><br /> <br /> <br />
<br /> <span style="font-family:myriad pro,trebuchet ms,arial,sans-serif; font-
size:16px">I have installed CKeditor which does
使用ckeditor/h1在前端显示的h1p标签
div
divspan style=“font系列:myriad pro,投石机
ms,arial,无衬线;字体大小:16px“嗨,/spanbr/
br/
span style=“font系列:myriad pro、投石机ms、arial、无衬线字体;font-
尺寸:16px“我安装了CKeditor,它可以
我应该修改什么配置选项来正确呈现内容
编辑1
我创建了一个助手类和这样的方法
str = str.replaceAll(""","\"");
str = str.replaceAll("<","<");
str = str.replaceAll(">",">");
str=str.replaceAll(“”,“\”);
str=str.replaceAll(“,”);
现在它在网页中运行良好,但为什么它会这样工作?
我仍然不知道…这并不奇怪,因为
?html
是一个用于转义html标记的内置函数,您可以在
如果您不想使用esacpe html,您应该只使用${post.text}
str = str.replaceAll(""","\"");
str = str.replaceAll("<","<");
str = str.replaceAll(">",">");