then in image cllback handler you can now access the quill object and range const quillObj = quillRef?.current?.getEditor(); const range = quillObj?.getSelection();
then append the image url after upload to the editor's current range
✨ Passionate about software development
👨💻 Geek
🚀 Enjoy building innovative apps
🌱 I love learning and teaching
[JS Dev] Focus on ReactJs and NextJs, React-Native, NodeJs.
i used reat-quill for the editor. please give me some reviews so i can improve more code4web.netlify.app/
(btw i get inspired to make this from dev.to so i kinda used their editor UI )
Arigato Guzaimas
Thanks a lot! You saved my time!
Thank you! This is very helpful.
How do you import ReactQuill modules (quill-image-resizing -module) on the dynamic imports ?
same pblm
can not use ref for image upload handler
ref does not work with dynamic import. you can use this
dynamic import
create ref
const quillRef = useRef(null)jsx
then in image cllback handler you can now access the quill object and range
const quillObj = quillRef?.current?.getEditor();const range = quillObj?.getSelection();then append the image url after upload to the editor's current range
quillObj.editor.insertEmbed(range.index, 'image', data?.secure_url);here the handler:
Getting an error for
forwardedRefProperty 'forwardedRef' does not exist on type '{}'.ts(2339)Same Issue I am facing @ivanfarkas .Did you got any solution to it.
Many thanks for this!! ❤️
i believe , you made a typpo in the beginning of your post
(that library don't exist), instead of
you corrected in your final code
Thank you for noticing. Fixed!
Server Error
TypeError: Quill.register is not a function
This error happened while generating the page. Any console logs will be displayed in the terminal window.
dev-to-uploads.s3.amazonaws.com/up...
dev-to-uploads.s3.amazonaws.com/up...
Can you show me how you imported React-quill?
Did you solution to it?
thanks you ! this help me lot
Thank you!! This helped me :)
toolbar is appearing twice. i don't know how to fix it.. i am using quill inside form element
Add this CSS in your global style:
.quill > .ql-toolbar:first-child {
display: none !important;
}
Or in your next.config.js
reactStrictMode: false,
SAme here. Didi you find a solution?
Simple solution, I guess not the best:
I don't think it's the best either, but definitely better than the previous one
When i use on reactquill with nextjs each onchange the whole component re-render how can i resolve this
I have also tried the same the above mention but still the whole component re-render problem persist
const QuillNoSSRWrapper = dynamic(() => import("react-quill"), {
ssr: false,
});
QuillNoSSRWrapper.register("modules/imageResize", ImageResize,);
but I want to register imageResizer it's showing error that imageResizer not exist
You are a superstar!
i used reat-quill for the editor. please give me some reviews so i can improve more code4web.netlify.app/
(btw i get inspired to make this from dev.to so i kinda used their editor UI )
Thank You
How to add quilljs-markdown with nextjs ?
you saved my life!
how to use quill-mention with react-quill in nextjs?
Thank you very much
how to fix this?
Thank u bro!!
Loveu so much haha
Excellente, Senior