|
@@ -25,6 +25,9 @@ export default {
|
|
editor: null,
|
|
editor: null,
|
|
lastEditRange: null,
|
|
lastEditRange: null,
|
|
froalaConfig:{
|
|
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: [
|
|
toolbarButtons: [
|
|
"textColor",
|
|
"textColor",
|
|
"bold",
|
|
"bold",
|
|
@@ -100,6 +103,8 @@ export default {
|
|
methods: {
|
|
methods: {
|
|
sendHtml(){
|
|
sendHtml(){
|
|
const str=this.html.replace(/<p data-f-id=\"pbf\".*?<\/p>/g, "")
|
|
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)
|
|
this.$emit('textChange', str)
|
|
}
|
|
}
|
|
},
|
|
},
|