編輯器https://github.com/yabwe/medi...上傳插件https://github.com/orthes/med...
起因https://github.com/orthes/med...我在上傳插件 medium-editor-insert-plugin.js 中找到上傳程序從1589行開始
label: '<span class="fa fa-camera"></span>',
deleteMethod: 'POST',
// deleteScript: 'delete.php',
preview: true,
// captions: true,
// captionPlaceholder: 'Type caption for image (optional)',
autoGrid: 3,
fileUploadOptions: { // See https://github.com/blueimp/jQuery-File-Upload/wiki/Options
url: '/public/dist/editor/upload.php',
acceptFileTypes: /(\.|\/)(gif|jpe?g|png)$/i
},
fileDeleteOptions: {},
styles: {
wide: {
label: '<span class="fa fa-align-justify"></span>'
// added: function ($el) {},
// removed: function ($el) {}
},
left: {
label: '<span class="fa fa-align-left"></span>'
// added: function ($el) {},
// removed: function ($el) {}
},
right: {
label: '<span class="fa fa-align-right"></span>'
// added: function ($el) {},
// removed: function ($el) {}
},
grid: {
label: '<span class="fa fa-th"></span>'
// added: function ($el) {},
// removed: function ($el) {}
}
},
我把上傳路徑改成他內(nèi)建上傳程序 upload.phphttps://github.com/orthes/med...和 UploadHandler.phphttps://github.com/orthes/med...
結(jié)果但即便我改了路徑,就算是失敗也不會上傳 base64到編輯器中吧但上傳圖片後又輸出 base64,不是應(yīng)該報錯嗎?我還真找不到這開關(guān)在哪難道說不是這樣改嗎?
目的我最後目的是當(dāng)按下上傳圖片後,可以將圖片傳送對後端 php 先處理過,並紀(jì)錄網(wǎng)址到數(shù)據(jù)庫,再吐回我處理過的網(wǎng)址回去 editor這是有辦法實現(xiàn)的嗎?
medium editor 如何改上傳程序?
ibeautiful
2019-03-09 02:59:19