首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java Web开发 >

FCKeditor使用的有关问题

2011-12-26 
FCKeditor使用的问题我用AJAX从数据库里提出需要修改的网页来,怎么把数据输入到FCKeditor中。我输入的内容

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>

热点排行