---
title: "FCKedtor   自动增加代码"
author: "hwpok"
date: "2008-08-20T16:14:00Z"
tags: [".net", "HTML", "JavaScript", "fckeditor"]
slug: "fckedtor"
draft: false
lastmod: "2008-08-20T16:14:00Z"
id: 615851
url: "https://hwpok.iteye.com/blog/615851"
---

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

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

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