
<% Function htmlspecialchars(str) str = Replace(str, "&", "&") str = Replace(str, "<", "<") str = Replace(str, ">", ">") str = Replace(str, """", """") htmlspecialchars = str End Function %> <meta charset="gb2312" /> <link rel="stylesheet" href="../../kindeditor/themes/default/default.css" /> <link rel="stylesheet" href="../../kindeditor/plugins/code/prettify.css" /> <script charset="gb2312" src="../../kindeditor/kindeditor.js"></script> <script charset="gb2312" src="../../kindeditor/lang/zh_CN.js"></script> <script charset="gb2312" src="../../kindeditor/plugins/code/prettify.js"></script> <script> KindEditor.ready(function(K) { var editor1 = K.create('textarea[name="content"]', { cssPath : '../../kindeditor/plugins/code/prettify.css', uploadJson : '../../kindeditor/asp/upload_json.asp', fileManagerJson : '../../kindeditor/asp/file_manager_json.asp', allowFileManager : true, afterCreate : function() { var self = this; K.ctrl(document, 13, function() { self.sync(); K('form[name=example]')[0].submit(); }); K.ctrl(self.edit.doc, 13, function() { self.sync(); K('form[name=example]')[0].submit(); }); } }); prettyPrint(); }); </script>
这个是别人配置好的,你也可以自己配置,不过,不管如何配置,都不要暴露你后台路径,另外ASPCMS是gb2312编码的,KINDEDITOR是utf-8编码的,需要将 kindeditor中文件的编码转换为 gb2312。kindeditor.js kindeditor-min.js lang/zh_CN.js 这三个文件的编码转换成GB2312。
4.打开 /admin_aspcms/_content/_About/AspCms_AboutEdit.asp ,搜索 内容,差不多在第43行的位置就是我们要替换编辑器的位置:替换为
- 5.重新刷新页面,新的编辑器就出现了,文章内容的编辑器替换和它一模一样,这里就不再重复说明。

使用编辑器的位置,常用的有:
_content/_Content/AspCms_ContentAdd.asp
_content/_Content/AspCms_ContentEdit.asp
_content/_About/AspCms_AboutEdit.asp
_content/_Sort/AspCms_SortEdit.asp
_content/_Sort/AspCms_Sortadd.asp
'文件保存目录路径 savePath = "../attached/" '文件保存目录URL saveUrl = aspUrl & "../attached/"
'文件保存目录路径 savePath = "../../../upload/" '文件保存目录URL saveUrl = aspUrl & "../../../upload/"
打开/admin_aspcms/kindeditor/asp/file_manager_json.asp。
'根目录路径,可以指定绝对路径,比如 /var/www/attached/ rootPath = "../attached/" '根目录URL,可以指定绝对路径,比如 http://www.yoursite.com/attached/ rootUrl = aspUrl & "../attached/"
替换为
'根目录路径,可以指定绝对路径,比如 /var/www/attached/ rootPath = "../../../upload/" '根目录URL,可以指定绝对路径,比如 http://www.yoursite.com/attached/ rootUrl = aspUrl & "../../../upload/"
至此,修改ASPCMS 编辑器工作完成。
共有条评论 网友评论