时间:2016-02-24 20:51 来源: 我爱IT技术网 作者:佚名
欢迎您访问我爱IT技术网,今天小编为你分享的编程技术是:【如何使用fckeditor在线编辑器】,下面是详细的分享!
如何使用fckeditor在线编辑器
1、去http://www.aspprogram.cn/soft.asp?id=38这个地址下载fckeditor在线编辑器(请先杀毒,后使用)2、fckeditor配置
a、为了使用根目录,我们将IIS的默认网站设置为站点,指向fckeditor(这个可改名)所在的目录。
b、现在建立一个asp文件,来调用fckeditor在线编辑器,假设为news.asp,代码如下:
<!--#include file="FCKeditor/fckeditor.asp" -->
<%
a=request("a")
If a="" Then
%>
<table border=1 cellpadding=0 cellspacing=0>
<form name="form1" method="post" action="?a=save">
<tr>
<td align="right">新闻内容</td>
<td height="25" align="left">
<%
Dim oFCKeditor
Set oFCKeditor = New FCKeditor
oFCKeditor.BasePath = "/fckeditor/"
'设置编辑器的路径,我站点根目录下的一个目录
'如果你改了目录的名,这里就需要改成那个目录名
oFCKeditor.ToolbarSet = "Default"
oFCKeditor.Width = "700"
oFCKeditor.Height = "500"
oFCKeditor.Value = ""
'这个是给编辑器初始值
oFCKeditor.Create "logbody"
'以后编辑器里的内容都是由这个logbody取得,命名由你定
%></td>
</tr>
<tr>
<td colspan=2 align="center">
<input type="submit" value=" 提 交 ">
</td>
</tr>
</form>
</table>
<%
Else '显示fckeditor在线编辑器内容
response.write request("logbody")
End If
%>
到这里,可以上传文字了
3、这个时候,我们在上传图片,出现上传错误。解决方法:
(1)fckconfig.js 中修改
FCKConfig.DefaultLanguage = 'zh-cn' ; //原来是en
FCKConfig.TabSpaces = 1 ; //在编辑器中是否可以是否TAB键 0 不可用 1 为可用
var _FileBrowserLanguage = 'asp' ;
var _QuickUploadLanguage = 'asp' ;
(2) fckeditor.asp 中修改
sBasePath = "/fckeditor/"
'表示 当前这个文件 fckeditor.asp相对于站点根目录的路径,看看我的目录排放
(3) FCKeditor\editor\filemanager\connectors\asp\config.asp中修改这里设置,用于文件上传
ConfigIsEnabled = true '启用上传功能 把 false 改成 true
ConfigUserFilesPath = "/upFile/" '设置你的上传目录 这里 "/upFile/" 表示站点根目录下的 upFile目录 ,这个目录是需要自己创建的,大家可以看到上图目录结构中我创建了 upFile 目录 ,这样上传的文件将会存放到这个目录中。FckEditor会根据您上传的类别自动在upFIle目录中创建如 image 、 flash 等目录。
这样就可以了,我们来试试index.asp程序,成功,可以上传图片了!!!
(4) fckeditor\editor\filemanager\browser\default\connectors\asp\config.asp 中修改
这里设置,用于浏览服务器上文件
ConfigIsEnabled = true '启用浏览功能,把false改成true
ConfigUserFilesPath = "/upfile/" 同(3)
完毕。
以上所分享的是关于如何使用fckeditor在线编辑器,下面是编辑为你推荐的有价值的用户互动:
相关问题:如何在freemarker下用FCKeditor在线编辑器
答:fckeditor是会对源代码的编辑产生过滤和添加一些代码. 所以你编辑模板的话请用文本的格式比较好. 试试TinyMCE,也是一个WYSWYG编辑器,貌似javaeye用的就是它。它不会吧 {LT}/#list{GT}{LT}/#if{GT} 过滤。 >>详细
相关问题:如何在fckeditor编辑器里编辑内容
答:fckeditor编辑器和word编辑器差不多你也可以先在word文档里面编辑好,然后复制到fckeditor编辑器里面 >>详细
相关问题:如何更换ASP网站中FCKEditor在线编辑器?
答:配置文件里可以修改。或者下载一个新版本的ASP的fckeditor。 >>详细
- 评论列表(网友评论仅供网友表达个人看法,并不表明本站同意其观点或证实其描述)
-
