<link rel="stylesheet" href="../editor2/themes/default/default.css" /> <link rel="stylesheet" href="../editor2/plugins/code/prettify.css" /> <script charset="utf-8" src="../editor2/kindeditor.js"></script> <script charset="utf-8" src="../editor2/lang/zh_CN.js"></script> <script charset="utf-8" src="../editor2/plugins/code/prettify.js"></script> <script type="text/javascript" > KindEditor.ready(function(K) { var editor1 = K.create('#dContent', { cssPath:'/editor2/plugins/code/prettify.css', uploadJson: '/editor2/asp.net/upload_json.ashx', fileManagerJson:'/editor2/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> upload_json.ashx //文件保存目录路径 String savePath = "../attached/"; //文件保存目录URL String saveUrl = aspxUrl + "../attached/"; file_manager_json.ashx //文件保存目录路径 String savePath = "../attached/"; //文件保存目录URL String saveUrl = aspxUrl + "../attached/";
文件夹的的目录是:editor2\asp
editor2\asp.net(file_manager_json.ashx和upload_json.ashx)
editor2\attached
editor2\examples
editor2\jsp deng 等等
你要把报错内容说出来呀,如果是上传后浏览图片不显示,那肯定是路径问题,在初始化KindEditor时,可以加一个参数:urlType:absolute,这样上传的路径将会是完整的绝对路径,具体其它参数设置详见:http://kindeditor.net/docs/option.html
我也感觉是路径的问题!我不知道从何下手啊!我下载下来的KindEditor是放在项目UI层下面的editor2文件夹下面! 点击图片选择本地上传图片!点击确定上传错误!批量图片上传也是一样的错误!