quill-image-resize-module icon indicating copy to clipboard operation
quill-image-resize-module copied to clipboard

moduleClass is not a constructor

Open randy-purba opened this issue 5 years ago • 2 comments

Uncaught TypeError: moduleClass is not a constructor at SnowTheme.addModule (quill.js:6130) at SnowTheme.addModule (quill.js:6774)

The above error occurred in the <Quill> component:

Any body have that same issue with me? Please help me

randy-purba avatar Jan 23 '20 04:01 randy-purba

Use import ImageResize from 'quill-image-resize'; instead of import {ImageResize} from 'quill-image-resize';

marcj avatar Feb 07 '20 23:02 marcj

I think given that the dist output is in UMD format, you would need to do something like the following:

import ImageResize from 'quill-image-resize';

const imageResize = ImageResize.default;

markuso avatar Dec 19 '22 22:12 markuso