|
|
@@ -36,11 +36,14 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import {quillEditor} from 'vue-quill-editor' // 富文本组件
|
|
|
+import {quillEditor } from 'vue-quill-editor' // 富文本组件
|
|
|
import { addQuillTitle } from '@/libs/quill-title' // 富文本配置
|
|
|
// import { newFileUpload } from '@/api/hegii/common' // 上传文件接口
|
|
|
import UploadService from '@/api/upload' // 上传图片接口和删除图片接口
|
|
|
import uuidv4 from 'uuid/v4' // webpack自带唯一id生成器
|
|
|
+// 这里引入修改过的video模块并注册
|
|
|
+import Video from '@/libs/quill-video'
|
|
|
+Quill.register(Video, true)
|
|
|
|
|
|
import imageResize from 'quill-image-resize-module'
|
|
|
Quill.register('modules/imageResize', imageResize )
|
|
|
@@ -134,7 +137,7 @@ export default {
|
|
|
const that = this
|
|
|
this.$refs[`myQuillEditor${this.id}`].quill.getModule('toolbar').addHandler('video', function(value) {
|
|
|
if (value) {
|
|
|
- document.querySelector(`.video-uploader${that.id} input`).click()
|
|
|
+ document.querySelector(`.video-uploader${that.id} `).click()
|
|
|
} else {
|
|
|
that.quill.format('video', false)
|
|
|
}
|
|
|
@@ -172,7 +175,7 @@ export default {
|
|
|
if (video) {
|
|
|
const quill = this.$refs[`myQuillEditor${this.id}`].quill
|
|
|
const length = quill.selection.savedRange.index
|
|
|
- quill.insertEmbed(length, type, video.data.absolutelyPath)
|
|
|
+ quill.insertEmbed(length, type, this.$config.imgUrl + video.data.path)
|
|
|
quill.setSelection(length + 1)
|
|
|
}
|
|
|
})
|
|
|
@@ -248,7 +251,7 @@ export default {
|
|
|
if (image) {
|
|
|
const quill = this.$refs[`myQuillEditor${this.id}`].quill
|
|
|
const length = quill.selection.savedRange.index
|
|
|
- quill.insertEmbed(length, imgType, 'https://s.dev01.dkiboss.com:6010/file' + image.data.path)
|
|
|
+ quill.insertEmbed(length, imgType, this.$config.imgUrl + image.data.path)
|
|
|
quill.setSelection(length + 1)
|
|
|
}
|
|
|
})
|