找到包里KindEditor\Editor\plugins\image\image.js文件
一: 找到:
if (allowImageUpload) {
tabs = K.tabs({
src: K('.tabs', div),
afterSelect: function (i) { }
});
// tabs.add({
// title : lang.remoteImage,
// panel : K('.tab1', div)
// });
tabs.add({
title: lang.localImage,
panel: K('.tab2', div)
});
tabs.select(tabIndex);
} else {
K('.tab1', div).show();
}
将增加远程图片的这个tab注释掉
tabs.add({
title : lang.remoteImage,
panel : K('.tab1', div)
});
2: 找到:
yesBtn: {
name: self.lang('yes'),
click: function (e) {
// Bugfix: http://code.google.com/p/kindeditor/issues/detail?id=319
if (dialog.isLoading) {
return;
}
// insert local image
if (tabs && tabs.selectedIndex === 0) { //--原来这里是1,改成0
if (uploadbutton.fileBox.val() == '') {
alert(self.lang('pleaseSelectFile'));
return;
}
dialog.showLoading(self.lang('uploadLoading'));
uploadbutton.submit();
localUrlBox.val('');
return;
}
将
if (tabs && tabs.selectedIndex === 1) {
改成
if (tabs && tabs.selectedIndex === 0) {