KindEditor.ready(function (K) {
   var editor = K.editor({
     uploadJson : '/cneditor/asp/upload_json.asp',
    fileManagerJson : '/cneditor/asp/file_manager_json.asp',
     allowFileManager : true
   });
K('#file').click(function() {
   editor.loadPlugin('insertfile', function() {
     editor.plugin.fileDialog({
     fileUrl : K('#url').val(),
     clickFn : function(url, title) {
        K('#url').val(url);
        editor.hideDialog();
     }
    });
   });
});
});
