diff --git a/src/core/view/components/editor/index.vue b/src/core/view/components/editor/index.vue index 49beb8172b630af996032147bb420a01c9f1f517..227c01dc3da81e8e666a48a9f07b7e7b4d07fbcf 100644 --- a/src/core/view/components/editor/index.vue +++ b/src/core/view/components/editor/index.vue @@ -226,19 +226,20 @@ export default { }, initQuill (imageResizeModules) { const Quill = window.Quill - Quill.register('modules/ImageResize', window.ImageResize.default) formats.register(Quill) - - const quill = this.quill = new Quill(this.$el, { + const options = { toolbar: false, readOnly: this.readOnly, placeholder: this.placeholder, - modules: { - ImageResize: { - modules: imageResizeModules - } + modules: { } + } + if (imageResizeModules.length) { + Quill.register('modules/ImageResize', window.ImageResize.default) + options.modules.ImageResize = { + modules: imageResizeModules } - }) + } + const quill = this.quill = new Quill(this.$el, options) const $el = quill.root const events = ['focus', 'blur'] events.forEach(name => {