• 如何使用fckeditor在线编辑器(asp)


    网摘自:http://www.chinaz.com/Program/Asp/0Z33DX2008.html

    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)

    完毕。
  • 相关阅读:
    高地址,低地址:
    大小端
    大小端
    linux下C语言编程解决warning : incompatible implicit declaration of built-in function问题
    给char赋16进制
    go channel 概述
    vue2.x入门学习
    vue-cli安装记录
    maven常用Java配置
    activiti工作流引擎
  • 原文地址:https://www.cnblogs.com/lfzwenzhu/p/1408557.html
Copyright © 2020-2023  润新知