編輯器
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) {}
}
},
我把上傳路徑改成他內建上傳程序 upload.php
https://github.com/orthes/med...
和 UploadHandler.php
https://github.com/orthes/med...
結果
但即便我改了路徑,就算是失敗也不會上傳 base64到編輯器中吧
但上傳圖片後又輸出 base64,不是應該報錯嗎?我還真找不到這開關在哪
難道說不是這樣改嗎?
目的
我最後目的是當按下上傳圖片後,可以將圖片傳送對後端 php
先處理過,並紀錄網址到數據庫,再吐回我處理過的網址回去 editor
這是有辦法實現的嗎?
qq_遁去的一_1