Closed TheDarkStrix closed 2 years ago
had you tried import QuillImageDropAndPaste from "quill-image-drop-and-paste"
?
Yes sir !
The same issue .
The only reason i used this is to make sure that this loads on frontend side rather than the backend side of things
const QuillImageDropAndPaste =
typeof window === "object"
? require("quill-image-drop-and-paste")
: () => false;
@TheDarkStrix , try this:
const QuillImageDropAndPaste =
typeof window === "object"
? require("quill-image-drop-and-paste").default
: () => false;
Thanks Mr. Chen,
It’s working. My problem was with ImageData in custom handler, in Nuxt.js.
I solved it by,
const QuillImageData =
process.client
? require("quill-image-drop-and-paste").ImageData
: null;
USP of your module is added minification, Kindly upgrade to have a lower filesize after minification.
I see, how you solved the paste text problem. Very nice. TypeScript datatypes are also a good improvement.
Keep up the good work.
Thanks a lot.
Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows
From: Jacket @.> Sent: 15 August 2021 20:28 To: @.> Cc: Nabendu @.>; @.> Subject: Re: [chenjuneking/quill-image-drop-and-paste] TypeError: moduleClass is not a constructor [nextjs] (#30)
@TheDarkStrixhttps://github.com/TheDarkStrix , try this:
const QuillImageDropAndPaste =
typeof window === "object"
? require("quill-image-drop-and-paste").default
: () => false;
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/chenjuneking/quill-image-drop-and-paste/issues/30#issuecomment-899063130, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABYH6D4PN4IIQD5DSBN33CLT47I2TANCNFSM5CE3U2BA. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email.
Since this issue has been resolved, I closed it now. If you have any problem, feel free to let me know.
Hey guys , I am trying to implement drop and paste , i basically want catch image and upload to cloud instead of using base64 .
The code below is my current implementation . But I get the error
TypeError: moduleClass is not a constructor
.Not sure what is wrong.
Any help is very much appreciated, thanks.
Versions: "react-quill": "^2.0.0-beta.2", "quill": "^1.3.7", "quill-image-drop-and-paste": "^1.2.5",
@chenjuneking