-
Notifications
You must be signed in to change notification settings - Fork 921
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
React Quill in NextJS #699
Comments
@TheDarkStrix Have you tried putting the whole editor in a separate module, e.g. Page module ~/pages/index.ts: import dynamic from "next/dynamic";
const MyEditor = dynamic(() => import("../components/MyEditor");
// ...
export default function IndexPage(){
return <MyEditor/>
} View module: ~/components/MyEditor.tsx import ReactQuill from "react-quill";
import Quill from "quill";
export default function MyEditor(){
const [value, setValue] = useState("");
const quillRef = useRef();
useEffect(() => {
const katex = window.katex;
console.log(quillRef.current);
let enableMathQuillFormulaAuthoring = mathquill4quill({ Quill });
enableMathQuillFormulaAuthoring(quillRef.current.editor);
}, [quillRef]);
// ...
return <ReactQuill />;
} |
Also, you're using the |
Thank you for your response, I ended up implementing like this, but still have issues with registering quill libraries
|
The simplest way is with dynamic import importing only when is not in server
|
My source Code :
https://pastebin.com/bDP84zcs
Screenshot of the error :
https://ibb.co/42w5sNn
Not sure what is wrong here , any insights to get this working is very much appreciated .
I am also using mathquill4quill.
I am using NEXTJS
ReactQuill version
The text was updated successfully, but these errors were encountered: