asp版FCKEditor编辑器的用法

来源:风之相随'S BLOG 时间:2008-07-05 12:15:00 

1:下载FCKEditor编辑器

下载下来后解压到你网站的目录,最好就放在根目录下,文件夹名字就用FCKEditor;这里可以随便自己喜好,但我的例子里就是这样。

2:在页面里引用

首先引用FCKEditor:在你的页面里加入

<!-- #include file="FCKeditor/fckeditor.asp" -->

然后在你页面中想要它显示的地方加入以下代码

<%
Dim oFCKeditor
Set oFCKeditor = New FCKeditor
oFCKeditor.BasePath = "FCKeditor/"

oFCKeditor.ToolbarSet = "Default"
oFCKeditor.Width = "98%"
oFCKeditor.Height = "500px"

oFCKeditor.Value = ""
oFCKeditor.Create "logbody"
%>

 这段的作用就是初始加载FCKeditor编辑器。

到此,你就已经添加成功,你的页面中就已经出现编辑器了。

如何把FCKeditor的内容保存到数据库,如何把数据库里的数据显示在FCKeditor中,我想这是多数初用者最想知道的。请看上面引用代码中的这一句:oFCKeditor.Create "logbody" 这里的logbody就代表你的FCKeditor,你也可以用其它的名字。

3.怎么使用呢,我是这样做的:用一个表单把它装起来,然后就和文本框一样使用了,如:

<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 = ""

标签:FCKEditor,编辑器,asp
0
投稿

猜你喜欢

  • numpy 实现返回指定行的指定元素的位置索引

    2021-01-19 04:32:27
  • 深入浅出解析mssql在高频,高并发访问时键查找死锁问题

    2024-01-29 02:32:54
  • matplotlib基础绘图命令之errorbar的使用

    2022-03-10 23:20:38
  • js 实现数值的千分位及保存小数方法(推荐)

    2023-08-17 01:13:11
  • python求最大连续子数组的和

    2022-05-12 07:23:24
  • 详解Go strconv包

    2024-04-23 09:42:08
  • 从mysql到oracle你必须了解的50件事儿

    2010-08-05 14:36:00
  • vue.js指令v-for使用及索引获取

    2024-04-30 10:46:49
  • Mysql中文乱码以及导出为sql语句和Excel问题解决方法[图文]

    2024-01-17 10:23:24
  • 解决Windows环境下安装 mysql-8.0.11-winx64 遇到的问题

    2024-01-22 18:45:21
  • Python集合的增删改查操作

    2023-09-30 00:48:18
  • 解决antd Form 表单校验方法无响应的问题

    2024-05-28 16:00:23
  • Python常见异常类型处理

    2021-12-30 03:09:01
  • Python如何读取相对路径文件

    2023-12-06 17:03:18
  • XAMPP和Mysql共存的方法

    2010-12-03 16:34:00
  • 详解Python中的四种队列

    2021-05-10 01:48:04
  • Python实现手写一个类似django的web框架示例

    2022-06-18 03:17:26
  • SQL触发器实例讲解

    2024-01-24 13:46:55
  • Python range与enumerate函数区别解析

    2022-03-05 21:40:20
  • python数据可视化Pyecharts库sankey修改桑葚图颜色

    2023-09-04 08:56:13
  • asp之家 网络编程 m.aspxhome.com