编辑器里面的内容,和编辑器里面的图片上传都没有问题,可以存入数据库,就是下面单独的图片上传,也能传上图片,文本框也显示值,但是就是这个单独上传图片的值存不了数据库,我用的是asp版本的,请求解决!
代码:
<script charset="utf-8" src="/Kdmodi/kindeditor.js"></script>
<script charset="utf-8" src="/Kdmodi/lang/zh_CN.js"></script>
<script charset="utf-8" src="/Kdmodi/plugins/code/prettify.js"></script>
<script>
KindEditor.ready(function(K) {
var editor1 = K.create('textarea[name="Content"]', {
cssPath : '/Kdmodi/plugins/code/prettify.css',
uploadJson : '/Kdmodi/asp/upload_json.asp',
fileManagerJson : '/Kdmodi/asp/file_manager_json.asp',
allowFileManager : true,
afterBlur : function() {
this.sync();
K.ctrl(document, 13, function() {
K('form[name=myform]')[0].submit();
});
K.ctrl(this.edit.doc, 13, function() {
K('form[name=myform]')[0].submit();
});
}
});
var editor = K.editor({
cssPath : '/Kdmodi/plugins/code/prettify.css',
uploadJson : '/Kdmodi/asp/upload_json.asp',
fileManagerJson : '/Kdmodi/asp/file_manager_json.asp',
allowFileManager : true
});
K('#image1').click(function() {
editor.loadPlugin('image', function() {
editor.plugin.imageDialog({
imageUrl : K('#DefaultPicUrl').val(),
clickFn : function(url, title, width, height, border, align) {
K('#DefaultPicUrl').val(url);
editor.hideDialog();
}
});
});
});
K('#image2').click(function() {
editor.loadPlugin('image', function() {
editor.plugin.imageDialog({
showLocal : false,
imageUrl : K('#url2').val(),
clickFn : function(url, title, width, height, border, align) {
K('#url2').val(url);
editor.hideDialog();
}
});
});
});
K('#image3').click(function() {
editor.loadPlugin('image', function() {
editor.plugin.imageDialog({
showRemote : false,
imageUrl : K('#url3').val(),
clickFn : function(url, title, width, height, border, align) {
K('#url3').val(url);
editor.hideDialog();
}
});
});
});
});
</script>