react-quill
react-quill copied to clipboard
Broken editor in NextJS app
Having an issue with broken styles in NextJS project using React-Quill v2.0.0, NextJS v12.3.0
this was working just fine a couple weeks ago, and did this intermittently when browser wasn't completely updated, but now it happens on latest version of Chrome, Firefox, and Safari.
const QuillNoSSRWrapper = dynamic(import('react-quill'), {
ssr: false,
loading: () => <p>Loading ...</p>,
});
<QuillNoSSRWrapper
className="bg-white"
theme="snow"
modules={modules}
formats={formats}
onChange={(content) => {
dispatch({ type: 'handleInput', name: 'content', payload: content });
}}
/>
In my case I had to import the styles...simply adding import 'react-quill/dist/quill.snow.css'; on top of the component file.
ah good catch, I was sure I had done that in my _app.tsx file but I guess not 😅