我目前将vue用于前端,将django用于后端。 我在前端Vue中使用了编辑器的编辑器,但是我不知道要在imageUpload中放入什么。 我应该放后端的API吗?这是我当前的代码。
configOptions = {
buttons: ['format', 'bold', 'italic', 'lists', 'link', 'image', 'file'],
plugins: ['imagemanager', 'filemanager']
imageUpload:
'http://backend-url/image/',
imageData: {
id: 10,
elements: '#my-input, #my-form'
}
}
答案 0 :(得分:1)
您可以使用imageUpload上传与文本内联的图像。要添加图像,您可以将功能添加到imageUpload,以将图像提交到数据库或vuex存储。例如;
imageUpload: (data, files, e, upload) => {
// commit to your vuex store, or do a post request to your API url.
},