react-quill icon indicating copy to clipboard operation
react-quill copied to clipboard

Broken editor in NextJS app

Open RichardSPrins opened this issue 2 years ago • 2 comments

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 });
                }}
              />
Screen Shot 2023-05-08 at 3 58 50 PM

RichardSPrins avatar May 08 '23 22:05 RichardSPrins

In my case I had to import the styles...simply adding import 'react-quill/dist/quill.snow.css'; on top of the component file.

DorianW avatar May 10 '23 14:05 DorianW

ah good catch, I was sure I had done that in my _app.tsx file but I guess not 😅

RichardSPrins avatar May 11 '23 02:05 RichardSPrins