转自:https://blog.csdn.net/asinzy/article/details/3854127

本篇文章主要介绍了"FCKeditor用在JSP中的几点注意事项",主要涉及到FCKeditor用在JSP中的几点注意事项方面的内容,对于FCKeditor用在JSP中的几点注意事项感兴趣的同学可以参考一下。

1、如果是用javascript调用FCKeditor,注意其中的basePath路径的含义——"/test/FCKeditor/"中的第一个“/”表示整个应用服务器根目录,test表示工程名,FCKeditor为test工程下的一个文件夹,最后的“/”不能少,否则报错
<script type="text/javascript">
var oFCKeditor = new FCKeditor('content') ;
oFCKeditor.BasePath = "/test/FCKeditor/" ;
oFCKeditor.Height = 400;
oFCKeditor.ToolbarSet = "Default" ;
oFCKeditor.ReplaceTextarea();
</script>
2、 如果采用标签形式调用FCKeditor,与上面不同的是"/fckeditor"中的“/”表示的是用了fckeditor的这个特定工程的根目录,因为以下代码在服务器端执行,而javascript在客户端执行,所有有如此的区别。 并且value="000"这个地方,字符串不能为空字符串,哪怕你设定一个“ ”也行,但不能为“”
<FCK:editor instanceName="myEditor" basePath="/fckeditor" value="000" >
  000000
</FCK:editor>
posted on 2016-10-31 23:11  Sharpest  阅读(268)  评论(0编辑  收藏  举报