Browse Source

富文本编辑器修改

master
liaoxiping 3 years ago
parent
commit
c43f07e97d
  1. 2
      .env.development
  2. 2
      admin-web/index.html
  3. 1
      admin-web/static/css/chunk-commons.60773cc4.css
  4. 1
      admin-web/static/css/chunk-commons.6b11ddb8.css
  5. 1
      admin-web/static/js/chunk-commons.0d0017da.js
  6. 1
      admin-web/static/js/chunk-commons.370c6686.js
  7. 5
      src/components/Tinymce/components/EditorImage.vue
  8. 30
      src/components/Tinymce/index.vue

2
.env.development

@ -3,7 +3,7 @@ ENV = 'development'
VUE_APP_PROJECT_NAME = 'cereshop-admin-web'
# 请求服务配置
VUE_APP_DEV_REQUEST_DOMAIN_PREFIX = 'http://192.168.10.130:8764'
VUE_APP_DEV_REQUEST_DOMAIN_PREFIX = 'http://192.168.10.236:8764'
#VUE_APP_DEV_REQUEST_DOMAIN_PREFIX = 'http://8764.graf0b20.7xedcknz.ca6242.grapps.cn'
#VUE_APP_DEV_REQUEST_DOMAIN_PREFIX = 'http://platform.test.api.lotus-wallet.com/'
# 是否启用验证码

2
admin-web/index.html

File diff suppressed because one or more lines are too long

1
admin-web/static/css/chunk-commons.60773cc4.css

@ -0,0 +1 @@
.editor-slide-upload[data-v-ea4df53e]{margin-bottom:20px}.editor-slide-upload[data-v-ea4df53e] .el-upload--picture-card{width:100%}.tinymce-container[data-v-47eaa0ca]{position:relative;line-height:normal}.tinymce-container[data-v-47eaa0ca] .mce-fullscreen{z-index:10000}.tinymce-textarea[data-v-47eaa0ca]{visibility:hidden;z-index:-1}.editor-custom-btn-container[data-v-47eaa0ca]{position:absolute;right:4px;top:4px}.fullscreen .editor-custom-btn-container[data-v-47eaa0ca]{z-index:10000;position:fixed}.editor-upload-btn[data-v-47eaa0ca]{display:inline-block}.pagination-container[data-v-6bb784f3]{background:#fff;padding:32px 16px 16px 0;margin-top:0}.hidebtn .el-upload,.pagination-container.hidden[data-v-6bb784f3]{display:none}

1
admin-web/static/css/chunk-commons.6b11ddb8.css

@ -1 +0,0 @@
.editor-slide-upload[data-v-62a51960]{margin-bottom:20px}.editor-slide-upload[data-v-62a51960] .el-upload--picture-card{width:100%}.tinymce-container[data-v-138b9c4a]{position:relative;line-height:normal}.tinymce-container[data-v-138b9c4a] .mce-fullscreen{z-index:10000}.tinymce-textarea[data-v-138b9c4a]{visibility:hidden;z-index:-1}.editor-custom-btn-container[data-v-138b9c4a]{position:absolute;right:4px;top:4px}.fullscreen .editor-custom-btn-container[data-v-138b9c4a]{z-index:10000;position:fixed}.editor-upload-btn[data-v-138b9c4a]{display:inline-block}.pagination-container[data-v-6bb784f3]{background:#fff;padding:32px 16px 16px 0;margin-top:0}.hidebtn .el-upload,.pagination-container.hidden[data-v-6bb784f3]{display:none}

1
admin-web/static/js/chunk-commons.0d0017da.js

File diff suppressed because one or more lines are too long

1
admin-web/static/js/chunk-commons.370c6686.js

File diff suppressed because one or more lines are too long

5
src/components/Tinymce/components/EditorImage.vue

@ -158,10 +158,11 @@ export default {
this.dialogVisible = false
},
handleSuccess(response, file) {
if (response.data.dataType == 'IMAGE') {
console.log(response,'response')
if (response.data.dataType.code == 'IMAGE') {
this.list.push(response.data.url)
}
if (response.data.dataType == 'VIDEO') {
if (response.data.dataType.code == 'VIDEO') {
this.videoUrl = response.data.url
}
const uid = file.uid

30
src/components/Tinymce/index.vue

@ -209,18 +209,24 @@ export default {
},
imageSuccessCBK(arr,videoUrl) {
const _this = this
arr.forEach(v => {
window.tinymce.get(_this.tinymceId).insertContent(`<img class="wscnph" src="${v}" >`)
})
window.tinymce.get(_this.tinymceId).insertContent(`<video
class="video-js"
controls
autoplay="muted"
preload="auto"
src="${videoUrl}"
poster="../../../assets/logo/microsoft.png">
</video>`)
console.log(arr,'arr')
console.log(videoUrl,'videoUrl')
if(arr.length) {
arr.forEach(v => {
window.tinymce.get(_this.tinymceId).insertContent(`<img class="wscnph" src="${v}" >`)
})
}
if(videoUrl) {
window.tinymce.get(_this.tinymceId).insertContent(`<video
class="video-js"
controls
autoplay="muted"
preload="auto"
src="${videoUrl}"
poster="../../../assets/logo/microsoft.png">
</video>`)
}
}
}
}

Loading…
Cancel
Save