chenjuneking / quill-image-drop-and-paste

A quill editor module for drop and paste image, with a callback hook before insert image into the editor
ISC License
105 stars 44 forks source link

Any plans to make this lib work for angular? #29

Closed bri1990 closed 3 years ago

bri1990 commented 3 years ago

Initially I thought it would work for angular, however I can't get it to work. the following error keeps coming back

Error: Uncaught (in promise): TypeError: moduleClass is not a constructor TypeError: moduleClass is not a constructor

also

import * as QuillImageDropAndPaste from 'quill-image-drop-and-paste'; gives an error, even though the module is installed. following error: Cannot find module 'quill-image-drop-and-paste' or its corresponding type declarations.

I thought that the following code worked, but it does not

const QuillImageDropAndPaste = require('quill-image-drop-and-paste');  
Quill.register('modules/imageDropAndPaste', QuillImageDropAndPaste);

any thoughts?

i'm also using https://www.npmjs.com/package/ngx-quill

chenjuneking commented 3 years ago

Hi, I made a angular example, hope it can help you. 👉 Angular Dmo