当前位置: > 新闻动态 > 网站设计 >
联系我们
电话咨询:13915107752
电话咨询:0517-89862517
地址: 淮安市清河区金马广场北楼24楼019室

aspcms后台编辑器更换方法

作者/整理:deming 日期:2014-12-09


aspcms官方的编辑器一直不好用,从WORD中复制的文本到里面格式也会变形。

所以,我就把官方自带的编辑器换成了 kindeditor 。

废话少说,开始替换。

下载附件使用的同学,upload 目录下需先新建 image 文件夹,上传的图片都在这个文件夹下。

kindeditor修改合并步骤:
1.打开后台文件夹,官方默认是 admin_aspcms,官方默认的编辑器是 editor,不用管,调用编辑器的位置在 \_content\ ,,里面文件夹分别有 文章,单篇,等,_About 是单篇文章 的路径,_Content是文章 产品等 路径。

2.下载 kindeditor  ,官方下载地址   复制kindeditor编辑器到后台路径,如 /admin_aspcms/ ,


3.配置kindeditor,ASPCMS是gb2312编码的,KINDEDITOR是utf-8编码的,需要将 kindeditor中文件的编码转换为 gb2312,一般我只转换/kindeditor/lang/zh_CN.js,其他的暂没有发现影响。

4.我这里只对一个文件进行演示,其他略同,打开 /admin_aspcms/_content/_About/AspCms_AboutEdit.asp 在<head></head>中添加
  1. <script charset="gb2312" src="../../kindeditor/kindeditor-min.js"></script>

  2. <script charset="gb2312" src="../../kindeditor/lang/zh_CN.js"></script>

  3. <script type="text/javascript">

  4. function LoadEditor(a) {

  5.     var b;

  6.     return b = KindEditor.create('textarea[name="' + a + '"]', {

  7.         uploadJson: "../../kindeditor/asp/upload_json.asp",

  8.         fileManagerJson: "../../kindeditor/asp/file_manager_json.asp",

  9.         allowFileManager: !0,

  10.         filterMode: !1

  11.     });

  12. }

  13. KindEditor.ready(function() {

  14.     LoadEditor("content");

  15. });

  16. </script>
搜索插入分页<BR> 将下面
  1.  

  2. <%Dim oFCKeditor:Set oFCKeditor = New FCKeditor:oFCKeditor.BasePath="../../editor/":oFCKeditor.ToolbarSet="AdminMode":oFCKeditor.Width="615":oFCKeditor.Height="300":oFCKeditor.Value=decodeHtml(Content):oFCKeditor.Create "Content"
    • 'Default,AdminMode,Simple,UserMode,Basic
      • %>
替换为
  1. <textarea name="content" style="width:700px;height:300px;visibility:hidden;"><%=content%></textarea>
<%=content%>是文章的内容。 其他位置的编辑器修改和此处略同!

5.重新刷新页面,新的编辑器就出现了,文章内容的编辑器替换和它一模一样,这里就不再重复说明。