日期:2014-05-18  浏览次数:20680 次

FCKeditor使用的问题
我用AJAX从数据库里提出需要修改的网页来,怎么把数据输入到FCKeditor中。我输入的内容是网址比如: <p> <input   type= "text "   /> </p>
在FCKeditor中显示的源代码是 <p> &lt;p&gt;&lt;input   type=&quot;text&quot;   /&gt;&lt;/p&gt; </p>
我怎么样才能让FCKeditor显示的源代码是 <p> <input   type= "text "   /> </p>


------解决方案--------------------
<FCK:editor id= "content "> <c:out value= "${vo.CONTENT} " escapeXml= "true "/> </FCK:editor>
如上,escapeXml的值为true或false,true可以解析


------解决方案--------------------
用正则表达式吧
<script language= "javascript ">
var str= " <p> &lt;p&gt;&lt;input type=&quot;text&quot; /&gt;&lt;/p&gt; </p> ";
str=str.replace(/&gt;/g, "> ");
str=str.replace(/&lt;/g, " < ");
str=str.replace(/&quot;/g, " \ " ");
alert(str);
</script>