react-quill not working in Nextjs 15 and react 19
This is error message: TypeError: react_dom_1.default.findDOMNode is not a function
- I think this error cause by the version of my application but i dont know if it exactly the bug or not.
- Please, does someone have a way to fix this issue
- Version: "react": "19.0.0-rc-f994737d14-20240522", "react-dom": "19.0.0-rc-f994737d14-20240522", "next": "15.0.0-rc.0", "react-quill": "^2.0.0-beta.4",
I tryna use react-quill in my project but got error ** TypeError: react_dom_1.default.findDOMNode is not a function**
- This is my RichEditor component:
"use client"
// some import
const ReactQuill = dynamic(() => import("react-quill"), { ssr: false });
export const RichEditorField = (props: IRichEditorFieldProps) => {
const quillRef = useRef<any>();
// more code goes herre
return (
<ReactQuill
// ref={quillRef}
placeholder={placeholder}
value={value}
modules={modules}
onChange={onChange}
className="wrap-quill"
readOnly={disabled}
formats={formats}
/>
);
};
- This is where i use my component:
// import
const QuillRichTextEditor = dynamic(
() =>
import(
"@/components/form-control/rich-editor-field/components/editor"
).then((mod) => mod.RichEditorField),
{
ssr: false,
loading: () => <p>Loading Text Editor...</p>,
}
);
// i try another way to import but it still won't work
import {RichEditorField} from '.....';
// some import here
export const ModalDetail = () => {
return (
<QuillRichTextEditor
label="Content"
formContext={formContext}
name={`content_${currentLocale.key}`}
disabled={isDisabeledField}
/>
)
};
This is because Chrome dropped support for a feature that an old quill version was using, and react-quill hasn't been updated yet. Try replacing react-quill with the forked react-quill-new in the interim until react-quill is updated. Also follow https://github.com/zenoamaro/react-quill/pull/973 for updates on that.
Thanks!!, this fork react-quill-new works for me!!
I have a similar issue. react_dom_1.default.findDOMNode is not a function
I have a similar issue.
react_dom_1.default.findDOMNode is not a function
Same
This is because Chrome dropped support for a feature that an old quill version was using, and react-quill hasn't been updated yet. Try replacing
react-quillwith the forked react-quill-new in the interim until react-quill is updated. Also follow #973 for updates on that.
Thanks a million.
Thanks so much. react-quill-new works for me.
This is because Chrome dropped support for a feature that an old quill version was using, and react-quill hasn't been updated yet. Try replacing
react-quillwith the forked react-quill-new in the interim until react-quill is updated. Also follow #973 for updates on that.
Isn't the problem because of React 19 dropping this function, and not Chrome? From what I've read it shouldn't have anything to do with Chrome.
Chrome 127 dropped support for the DOMNodeInserted mutation event, see Chrome Dev blog post. quill has since stopped using DOMNodeInserted, but react-quill is using an outdated version of quill, which is why users still get warnings. react-quill-new just uses a newer version of quill.
Hmmm, but the error is TypeError: react_dom_1.default.findDOMNode is not a function
@LukasDeco If it happens with react-quill-new, it could very well be an issue with how react-quill-new interacts with react 19 or next-js. In this case, feel free to create an issue on the issues page for react-quill-new and share a minimal reproducible example, and I'll fix it.
This is because Chrome dropped support for a feature that an old quill version was using, and react-quill hasn't been updated yet. Try replacing
react-quillwith the forked react-quill-new in the interim until react-quill is updated. Also follow #973 for updates on that.
Thank You π !
@Wilmela Thanks man it working
Heyo, I had a lot of issues implementing Quill.js in NEXT 15 + React 19 with plugins ! Essentially, I wanted to do this:
import ReactQuill, { Quill } from 'react-quill';
import 'react-quill/dist/quill.snow.css';
// The quill-image-resize-module-react package does not have a ts type defined, so we have to ignore the ts error
// @ts-ignore
import ImageResize from 'quill-image-resize-module-react';
//Function definition
<ReactQuill
ref={quillRef}
value={editorContent}
onChange={handleEditorChange}
theme='snow'
modules={modules}
className='h-screen max-w-full'
/>
But I guess as @VaguelySerious pointed out, 'react-quill' doesn't support react-19, ended up using react-quill-new and dynamically loading in the packages like this:
import dynamic from 'next/dynamic'
import 'react-quill-new/dist/quill.snow.css'
// The quill-image-resize-module-react package does not have a ts type defined, so we have to ignore the ts error
//@ts-ignore
const ImageResize = dynamic(() => import('quill-image-resize-module-react'), {
ssr: false
})
const ReactQuill = dynamic(() => import('react-quill-new'), { ssr: false })
Then, for 'Quill', I used a useEffect hook to ensure it only renders on the client side:
useEffect(() => {
// Dynamically import Quill and register the module
if (typeof window !== 'undefined') {
import('react-quill-new').then(({ Quill }) => {
Quill.register('modules/imageResize', ImageResize)
})
}
}, [])
//Function definition
<ReactQuill
// @ts-ignore
ref={quillRef}
value={editorContent}
onChange={handleEditorChange}
theme='snow'
modules={modules}
className='h-screen max-w-full'
/>
This seems to have worked for me, hope it helps someone in the future!
This is because Chrome dropped support for a feature that an old quill version was using, and react-quill hasn't been updated yet. Try replacing
react-quillwith the forked react-quill-new in the interim until react-quill is updated. Also follow #973 for updates on that.
Thanks dear, It was so helpful for me and my team and it works perfectly.
This is because Chrome dropped support for a feature that an old quill version was using, and react-quill hasn't been updated yet. Try replacing
react-quillwith the forked react-quill-new in the interim until react-quill is updated. Also follow #973 for updates on that.
Bro, I really want to say that this fork version react-quill-new is working fine, thanks so much, any idea that when the official one will be released on react 19?
@Kimoalking It's unlikely the "official" version will be updated since the maintainers are MIA and I can't get in contact. If that doesn't change, I imagine react-quill-new will be the "official" version going forward, which I'm also happy to give to a more active maintainer if there are any volunteers
thank you very much!
Thanks for the solution
Thank a lot I sped 2 days on this now I fix my project. Thanks again. ### react-quill-new
This is because Chrome dropped support for a feature that an old quill version was using, and react-quill hasn't been updated yet. Try replacing
react-quillwith the forked react-quill-new in the interim until react-quill is updated. Also follow #973 for updates on that.
Thanks a lot β€οΈ
This is because Chrome dropped support for a feature that an old quill version was using, and react-quill hasn't been updated yet. Try replacing
react-quillwith the forked react-quill-new in the interim until react-quill is updated. Also follow #973 for updates on that.
Thank you so much, it worked perfectly.
Heyo, I had a lot of issues implementing Quill.js in NEXT 15 + React 19 with plugins ! Essentially, I wanted to do this:
import ReactQuill, { Quill } from 'react-quill'; import 'react-quill/dist/quill.snow.css'; // The quill-image-resize-module-react package does not have a ts type defined, so we have to ignore the ts error // @ts-ignore import ImageResize from 'quill-image-resize-module-react'; //Function definition <ReactQuill ref={quillRef} value={editorContent} onChange={handleEditorChange} theme='snow' modules={modules} className='h-screen max-w-full' />But I guess as @VaguelySerious pointed out, 'react-quill' doesn't support react-19, ended up using react-quill-new and dynamically loading in the packages like this:
import dynamic from 'next/dynamic' import 'react-quill-new/dist/quill.snow.css' // The quill-image-resize-module-react package does not have a ts type defined, so we have to ignore the ts error //@ts-ignore const ImageResize = dynamic(() => import('quill-image-resize-module-react'), { ssr: false }) const ReactQuill = dynamic(() => import('react-quill-new'), { ssr: false })Then, for 'Quill', I used a useEffect hook to ensure it only renders on the client side:
useEffect(() => { // Dynamically import Quill and register the module if (typeof window !== 'undefined') { import('react-quill-new').then(({ Quill }) => { Quill.register('modules/imageResize', ImageResize) }) } }, []) //Function definition <ReactQuill // @ts-ignore ref={quillRef} value={editorContent} onChange={handleEditorChange} theme='snow' modules={modules} className='h-screen max-w-full' />This seems to have worked for me, hope it helps someone in the future!
Thank you. It worked for me too.
This is because Chrome dropped support for a feature that an old quill version was using, and react-quill hasn't been updated yet. Try replacing
react-quillwith the forked react-quill-new in the interim until react-quill is updated. Also follow #973 for updates on that.
Thanks π
### This is error message: TypeError: react_dom_1.default.findDOMNode is not a function
This is because Chrome dropped support for a feature that an old quill version was using, and react-quill hasn't been updated yet. Try replacing
react-quillwith the forked react-quill-new in the interim until react-quill is updated. Also follow #973 for updates on that.
Thank You @VaguelySerious!! This worked for meππ»ππ»
react-quill-new works for me
met the same issue while using react ^18 and next 15.2.1
react-quill-new worked for me
react-quill-new worked for me
This is because Chrome dropped support for a feature that an old quill version was using, and react-quill hasn't been updated yet. Try replacing
react-quillwith the forked react-quill-new in the interim until react-quill is updated. Also follow #973 for updates on that.
thanks a bunch
in my next project i import it like this and now working , all thanks to you
export const Editor = ({ onChange, value }: EditorProps) => { const ReactQuill = useMemo( () => dynamic(() => import("react-quill-new"), { ssr: false }), [] );
return ( <div className="bg-white"> <ReactQuill value={value} onChange={onChange} theme="snow" /> ); };
Thanks!!, react-quill-new works for me too