|
@@ -25,6 +25,9 @@ export default {
|
|
|
editor: null,
|
|
|
lastEditRange: null,
|
|
|
froalaConfig:{
|
|
|
+ imageUploadURL: process.env.VUE_APP_API_ROOT + "/report/uploadImg", //上传url
|
|
|
+ videoUploadURL: process.env.VUE_APP_API_ROOT + "/report/uploadImg", //上传url
|
|
|
+ fileUploadURL: process.env.VUE_APP_API_ROOT + "/report/uploadImg", //上传url 更多上传介绍 请访问https://www.froala.com/wysiwyg-editor/docs/options
|
|
|
toolbarButtons: [
|
|
|
"textColor",
|
|
|
"bold",
|
|
@@ -100,6 +103,8 @@ export default {
|
|
|
methods: {
|
|
|
sendHtml(){
|
|
|
const str=this.html.replace(/<p data-f-id=\"pbf\".*?<\/p>/g, "")
|
|
|
+ //如果富文本中有未上传完成的图片,去除这个dom
|
|
|
+ $('.fr-element').find('img.fr-uploading').length&&$('.fr-element').find('img.fr-uploading').remove()
|
|
|
this.$emit('textChange', str)
|
|
|
}
|
|
|
},
|