1:下载FCKEditorweb
去www.baidu.com 搜索,我原本想上传的,但不知道怎么传。下载下来后解压到你网站的目录,最好就放在根目录下,文件夹名字就用FCKEditor;这里能够随便本身喜爱,但个人例子里就是这样。数据库
2:在页面里引用编辑器
首先引用FCKEditor:在你的页面里加入<!-- #include file="FCKeditor/fckeditor.asp" -->post
而后在你页面中想要它显示的地方加入如下代码网站
<%spa
Dim oFCKeditororm
Set oFCKeditor = New FCKeditorci
oFCKeditor.BasePath = "FCKeditor/"it
oFCKeditor.ToolbarSet = "Default"io
oFCKeditor.Width = "98%"
oFCKeditor.Height = "500px"
oFCKeditor.Value = ""
oFCKeditor.Create "logbody"
%> 这段的做用就是初始加载FCKeditor编辑器。这段网上都有注解,能够去搜索。
到此,你就已经添加成功,你的页面中就已经出现编辑器了。
如何把FCKeditor的内容保存到数据库,如何把数据库里的数据显示在FCKeditor中,我想这是多数初用者最想知道的。请看上面引用代码中的这一句:oFCKeditor.Create "logbody" 这里的logbody就表明你的FCKeditor,你也能够用其它的名字。
怎么使用呢,我是这样作的:用一个表单把它装起来,而后就和文本框同样使用了,如:
<form action="saveBhou.asp" method="post">
<%
Dim oFCKeditor
Set oFCKeditor = New FCKeditor
oFCKeditor.BasePath = "FCKeditor/"
oFCKeditor.ToolbarSet = "Default"
oFCKeditor.Width = "98%"
oFCKeditor.Height = "500px"
oFCKeditor.Value = ""
oFCKeditor.Create "logbody"
%>
</form
而后在saveBhou.asp里读取:text=request("logbody"),这里的text就是你要的内容,把他把存到数据库中就OK。
把数据库里的内容显示在FCKeditor中就在引用代码中给这句赋值oFCKeditor.Value = ""