|
@@ -6,7 +6,7 @@
|
|
import { uploadFile } from '@/api/common';
|
|
import { uploadFile } from '@/api/common';
|
|
export default {
|
|
export default {
|
|
props: {
|
|
props: {
|
|
- readonly:{
|
|
|
|
|
|
+ readonly: {
|
|
type: Boolean,
|
|
type: Boolean,
|
|
default: false
|
|
default: false
|
|
},
|
|
},
|
|
@@ -26,22 +26,23 @@ export default {
|
|
setting: {
|
|
setting: {
|
|
menubar: false,
|
|
menubar: false,
|
|
ProgressState: true,
|
|
ProgressState: true,
|
|
- readonly:this.readonly,
|
|
|
|
|
|
+ readonly: this.readonly,
|
|
toolbar:
|
|
toolbar:
|
|
'fullscreen preview code | undo redo | lineheight bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | numlist bullist | upfile image axupimgs media importword table | formatselect fontselect fontsizeselect forecolor backcolor | indent outdent | superscript subscript | removeformat | wordcount | help',
|
|
'fullscreen preview code | undo redo | lineheight bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | numlist bullist | upfile image axupimgs media importword table | formatselect fontselect fontsizeselect forecolor backcolor | indent outdent | superscript subscript | removeformat | wordcount | help',
|
|
toolbar_drawer: 'sliding',
|
|
toolbar_drawer: 'sliding',
|
|
quickbars_selection_toolbar: 'removeformat | bold italic underline strikethrough | fontsizeselect forecolor backcolor',
|
|
quickbars_selection_toolbar: 'removeformat | bold italic underline strikethrough | fontsizeselect forecolor backcolor',
|
|
- plugins: 'preview code lineheight wordcount upfile image axupimgs imagetools media table lists fullscreen quickbars help',
|
|
|
|
|
|
+ plugins: 'paste preview code lineheight wordcount upfile image axupimgs imagetools media table lists fullscreen quickbars help',
|
|
language: 'zh_CN',
|
|
language: 'zh_CN',
|
|
content_style: 'img {max-width:100%;}', //编辑器内限制图片大小
|
|
content_style: 'img {max-width:100%;}', //编辑器内限制图片大小
|
|
convert_urls: false,
|
|
convert_urls: false,
|
|
height: this.height,
|
|
height: this.height,
|
|
|
|
+ paste_data_images: true,
|
|
//图片上传
|
|
//图片上传
|
|
images_upload_handler: (blobInfo, succFun, failFun) => {
|
|
images_upload_handler: (blobInfo, succFun, failFun) => {
|
|
let formData = new FormData();
|
|
let formData = new FormData();
|
|
formData.append('file', blobInfo.blob());
|
|
formData.append('file', blobInfo.blob());
|
|
uploadFile(formData)
|
|
uploadFile(formData)
|
|
- .then(response => {
|
|
|
|
|
|
+ .then((response) => {
|
|
this.$modal.msgSuccess('上传成功');
|
|
this.$modal.msgSuccess('上传成功');
|
|
succFun(this.baseUrl + response.fileName);
|
|
succFun(this.baseUrl + response.fileName);
|
|
})
|
|
})
|
|
@@ -51,7 +52,7 @@ export default {
|
|
let formData = new FormData();
|
|
let formData = new FormData();
|
|
formData.append('file', file);
|
|
formData.append('file', file);
|
|
uploadFile(formData)
|
|
uploadFile(formData)
|
|
- .then(response => {
|
|
|
|
|
|
+ .then((response) => {
|
|
this.$modal.msgSuccess('上传成功');
|
|
this.$modal.msgSuccess('上传成功');
|
|
succFun(this.baseUrl + response.fileName);
|
|
succFun(this.baseUrl + response.fileName);
|
|
})
|
|
})
|
|
@@ -82,7 +83,7 @@ export default {
|
|
let formData = new FormData();
|
|
let formData = new FormData();
|
|
formData.append('file', file, file.name);
|
|
formData.append('file', file, file.name);
|
|
uploadFile(formData)
|
|
uploadFile(formData)
|
|
- .then(response => {
|
|
|
|
|
|
+ .then((response) => {
|
|
this.$modal.msgSuccess('上传成功');
|
|
this.$modal.msgSuccess('上传成功');
|
|
callback(this.baseUrl + response.fileName);
|
|
callback(this.baseUrl + response.fileName);
|
|
})
|
|
})
|
|
@@ -120,6 +121,6 @@ export default {
|
|
}
|
|
}
|
|
.tox-shadowhost.tox-fullscreen,
|
|
.tox-shadowhost.tox-fullscreen,
|
|
.tox.tox-tinymce.tox-fullscreen {
|
|
.tox.tox-tinymce.tox-fullscreen {
|
|
- z-index: 1200000!important;
|
|
|
|
|
|
+ z-index: 1200000 !important;
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|