<script> import { quillEditor } from 'vue-quill-editor' import * as Quill from 'quill' //引入编辑器 //quill图片可拖拽上传 import { ImageDrop } from 'quill-image-drop-module'; Quill.register('modules/imageDrop', ImageDrop); export default { data:function(){ return{ editorOption:{ modules:{ imageDrop:true, }, theme:'snow' } } } } </script>
四、图片调整大小ImageResize
<script> import { quillEditor } from 'vue-quill-editor' import * as Quill from 'quill' //引入编辑器 //quill图片可拖拽改变大小 import ImageResize from 'quill-image-resize-module' Quill.register('modules/imageResize', ImageResize) export default { data:function(){ return{ editorOption:{ modules:{ imageResize: {} }, theme:'snow' } } } } </script>
效果图如下:可以调整图片的对齐方式,并显示图片的大小