ITeye博客

FCKedtor 自动增加代码

hwpok · 2008-08-20 16:14 · TOOL · HTML · fckeditor · .net · JavaScript · Markdown

FCKeditor是一套开源的优秀的在线网页编辑器.

下面简述一下操作步骤:
1.到http://www.fckeditor.net上面去下载FCKeditor_2.6.3.zip解压。
2.把fckeditor文件夹复制到自己的项目里.
3.写一个测试页index.html并在里面加入:
<script type="text/javascript" src="/fckeditor/fckeditor.js"></script>

<script type="text/javascript">
  var oFCKeditor = new FCKeditor( 'Default' ) ;
  oFCKeditor.BasePath    = "/fckeditor/";
  oFCKeditor.Height    = 400 ;
  oFCKeditor.Value    = "<a href='http://www.baidu.com.cn'>abc</a>" ;
  oFCKeditor.Create() ;
</script>
经过上面三步就可以启动服务器了。
另外要注意的是,在FCKeditor里编辑代码,点“源码”后,会自动加上<p>....</p>等标签,不过这个没有关系,你把内容提交到服务器时,自动增加的标签也会自动被删掉。

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。