问题描述
editor
<CKEditor
editor={ ClassicEditor }
onReady={e => {
_initCkEditorObj(e)
}}
config={{
placeholder: 'write Text!.',removePlugins:['ImageCaption','MediaEmbed'],extraPlugins: [MyUploadAdapterPlugin]
}}
/>
MyUploadAdapterPlugin
class CkeditorUploadAdapter {
constructor( loader ) {
// Here,I want to initialize after receiving other data including loaders.
}
}
export function MyUploadAdapterPlugin(editor) {
editor.plugins.get('FileRepository').createUploadAdapter = (loader) => {
// Configure the URL to the upload script in your back-end here!
return new CkeditorUploadAdapter(loader)
}
}
目前,正在使用自定义适配器上传图像。上传图片时,我想向formData发送其他数据,但我不知道如何向自定义适配器发送参数。自定义适配器不能使用钩子,因为它是一个函数和类。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)