第一步,找到對應遠端功能,查閱:ueditor.all.js檔案,發現如下程式碼:
// plugins/catchremoteimage.js///import core///commands 遠端圖片抓取///commandsName catchRemoteImage,catchremoteimageenable///commandsTitle 遠端圖片抓取/** * 遠端圖片抓取,當開啟本外掛時所有不符合本地域名的圖片都將被抓取成為本地服務器上的圖片 */UE.plugins['catchremoteimage'] = function () { var me = this, ajax = UE.ajax; /* 設定預設值 */ if (me.options.catchRemoteImageEnable === false) return; me.setOpt({ catchRemoteImageEnable: false }); //.......};
有個配置引數:catchRemoteImageEnable
第二步,修改ueditor.config.js中的catchRemoteImageEnable配置引數
//抓取遠端圖片是否開啟,預設true,catchRemoteImageEnable:false
然後編輯器頁面,重新整理,然後複製貼上遠端圖片,這時不再向服務端傳送get請求catchimage。