你可以使用这个......我已经尝试过并且它有效.. :)
例如对于文件上传,我替换 addForm 函数...
nicURI : 'upload-foto.php', <!-- for upload, just echo for response file path -->
addForm : function() {
var formHTML = '<div id="pageForm"><form method="post" action="'+this.uri+'"><div style="font-size: 14px; font-weight: bold; padding-top: 5px;">Insert an Image</div><input id="upload_foto" name="upload_foto" type="file" style="margin-top: 10px;" /></form></div><div id="pageLoad" style="display: none;"><img src="http://files.nicedit.com/ajax-loader.gif" style="float: right; margin-right: 40px;" /><strong>Uploading...</strong><br />Please wait</div>';
var goo = this;
this.ne.selectedInstance.restoreRng();
$(function() {
$(this).find('#forUpload').append(formHTML);
$(this).find('#forUpload').find('#upload_foto').change(function(data) {
var thiP = $(this);
$(this).parents('#forUpload').find('#pageForm').hide();
$(this).parents('#forUpload').find('#pageLoad').show();
$(this).parents('form').ajaxForm(function(data) {
thiP.parents('#forUpload').find('#pageForm').show();
thiP.parents('#forUpload').find('#pageLoad').hide();
var tmp = data;
goo.ne.nicCommand("insertImage",tmp);
goo.im = goo.findElm('IMG','src',tmp);
}).submit();
});
});
},