我相信,有好多的人和我一样,都会有配置FCKeditor编译器的需要,可是FCKeditor编译器的配置难度可不是一点两点。于是,我折中处理,在网上各种搜,终于给我找到了一个方法。
那就是配置KindEditor。
废话不说,直接配置
1、直接去官网上下载最新版本的 KindEditor 。
2、直接解压,把里面的文件一股脑的复制到web目录下。
3、引用asp.net版本中的bin里面的dll。
4、在head中添加js,并且做了图片上传等等的配置。具体看官网。
<head id="Head1" runat="server">
<meta charset="utf-8" />
<title>KindEditor ASP.NET</title>
<link rel="stylesheet" href="themes/default/default.css" />
<link rel="stylesheet" href="plugins/code/prettify.css" />
<script charset="utf-8" src="kindeditor.js"></script>
<script charset="utf-8" src="lang/zh_CN.js"></script>
<script charset="utf-8" src="plugins/code/prettify.js"></script>
<script>
KindEditor.ready(function(K) {
var editor1 = K.create('#content1', {
cssPath : 'plugins/code/prettify.css',
uploadJson : 'asp.net/upload_json.ashx',
fileManagerJson : 'asp.net/file_manager_json.ashx',
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>
</head>
5、在页面需要的地方中调用。
<textarea id="content1" cols="100" rows="8" style="width:700px;height:200px;visibility:hidden;" runat="server"></textarea>
6、在page中加个属性validateRequest=false
好了,就这么简单!!