|
@@ -16,6 +16,8 @@ import {
|
|
|
quillEditor,
|
|
quillEditor,
|
|
|
Quill
|
|
Quill
|
|
|
} from 'vue-quill-editor'
|
|
} from 'vue-quill-editor'
|
|
|
|
|
+import ImageResize from 'quill-image-resize-module'
|
|
|
|
|
+Quill.register('modules/imageResize', ImageResize)
|
|
|
// Quill 1.3.6 的 ui/icons.js 不含 undo/redo,需手动注入到全局 icons 映射,
|
|
// Quill 1.3.6 的 ui/icons.js 不含 undo/redo,需手动注入到全局 icons 映射,
|
|
|
// 否则 snow 主题的 buildButtons 会因 icons[name] 为 null 跳过按钮 innerHTML 的渲染。
|
|
// 否则 snow 主题的 buildButtons 会因 icons[name] 为 null 跳过按钮 innerHTML 的渲染。
|
|
|
const icons = Quill.import('ui/icons')
|
|
const icons = Quill.import('ui/icons')
|
|
@@ -81,6 +83,14 @@ export default {
|
|
|
maxStack: 50,
|
|
maxStack: 50,
|
|
|
userOnly: false
|
|
userOnly: false
|
|
|
},
|
|
},
|
|
|
|
|
+ imageResize: {
|
|
|
|
|
+ displayStyles: {
|
|
|
|
|
+ backgroundColor: 'black',
|
|
|
|
|
+ border: 'none',
|
|
|
|
|
+ color: 'white'
|
|
|
|
|
+ },
|
|
|
|
|
+ modules: ['Resize', 'DisplaySize', 'Toolbar']
|
|
|
|
|
+ },
|
|
|
toolbar: {
|
|
toolbar: {
|
|
|
container: toolbarOptions,
|
|
container: toolbarOptions,
|
|
|
handlers: {
|
|
handlers: {
|