在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問答/HTML/ vue-quill-editor 的quill-image-resize-mod

vue-quill-editor 的quill-image-resize-module 改變插入圖片大小模塊引入報(bào)錯問題

圖片描述

圖片描述

一旦引入quill-image-resize-module這個(gè)模塊后就會報(bào)上圖的imports的錯,是這個(gè)模塊本身有問題嗎?

有什么推薦的富文本編輯器?最要可以實(shí)現(xiàn) 拖動插入圖片,改變插入圖片的大小,不要百度的富文本編輯器,需要搭配vue用,現(xiàn)在用的vue-quill-editor這個(gè)編輯器就是quill-image-resize-module 這個(gè)模塊報(bào)錯很蛋疼

回答
編輯回答
挽歌

Managed to get v3.0 and the image-drop module working with webpack

webpack.config.js:

module: {
  rules: [
    {
      test: /\.js$/,
      exclude: /node_modules(?!\/quill-image-drop-module|quill-image-resize-module)/,
      loader: 'babel-loader',
      query: {...}
    }
  ]
}
plugins: [
  new webpack.ProvidePlugin({
    'window.Quill': 'quill'
  })
]

Component.js:

import {ImageDrop} from 'quill-image-drop-module'
import ImageResize from 'quill-image-resize-module'

Quill.register('modules/imageResize', ImageResize)
Quill.register('modules/imageDrop', ImageDrop)

const quillModules = {
  ...
  imageDrop: true,
  imageResize: {}
}

You can also import the minified file from each module instead of transforming them with babel, but the image-drop module registers itself with Quill so you have to remove that.

最后在打包的時(shí)候,發(fā)現(xiàn)ImageDrop這個(gè)模塊壓縮又報(bào)錯了。
最后干脆不用這個(gè)ImageDrop了。

2018年1月22日 18:09
編輯回答
苦妄

同求答案。。

2017年10月7日 03:35
編輯回答
兔囡囡

您好,我也是用quill 的 imageDrop 壓縮的時(shí)候出錯 ,請問怎么配置,能指導(dǎo)一下嗎?

clipboard.png

2018年8月4日 01:33
編輯回答
萢萢糖

我也遇到了。。。。。

2018年7月25日 03:28
編輯回答
別傷我

我也遇到這個(gè)坑了(drop插件打包報(bào)錯問題),麻煩樓主大佬不吝賜教
https://segmentfault.com/q/10...

2018年3月16日 09:01