kensnyder / quill-image-resize-module

A module for Quill rich text editor to allow images to be resized.
MIT License
468 stars 467 forks source link

quill Overwriting modules/imageResize with #124

Open cvalues opened 3 years ago

cvalues commented 3 years ago

Hi all,

i am getting this warning message with my nuxt implementation:

quill Overwriting modules/imageResize with ƒ t(e){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(this,t),this.initializeModules=function(){n.removeModules(),n.modules=n.moduleClasses.map(function(t){return new(l[t]||t)…

nuxt.config.js

  build: {
  plugins: [
      new webpack.ProvidePlugin({
        'window.Quill': 'quill/dist/quill.js',
        'Quill': 'quill/dist/quill.js'
      })
    ],
}
import Quill from 'quill'
import VueQuillEditor from 'vue-quill-editor'
import ImageResize from 'quill-image-resize-module'
Quill.register('modules/imageResize', ImageResize)

import {ImageDrop} from 'quill-image-drop-module'
Quill.register('modules/imageDrop', ImageDrop)

How to get rid of it?

KR

ghost commented 3 years ago

Comment Out The Following:

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

And

Quill.register('modules/imageDrop', ImageDrop)
cvalues commented 3 years ago

Hi,

this results in: the modules work no longer and the warnings still come

quill.js?9339:2037 quill Cannot import modules/imageDrop. Are you sure it was registered?

KR,

ghost commented 3 years ago

I didn't note the fact that you're on a nuxt project, 'coz then I was gonna say, try moving those imports to the app.js file. I had the same problem when I imported them in the component but the problem left when I moved them to the app.js file.

Kolozuz commented 1 year ago

Comment Out The Following:

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

And

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

This worked for me, maybe cuz I am not using import, I'm using a script src tag

cvalues commented 1 year ago

seems to work now..thanks alot!

asjad2 commented 4 months ago

I didn't note the fact that you're on a nuxt project, 'coz then I was gonna say, try moving those imports to the app.js file. I had the same problem when I imported them in the component but the problem left when I moved them to the app.js file.

this worked for me. Thanks