For typescript next.js
React.useEffect(() => { if (quillRef.current) { const editor = quillRef.current?.editor; if (editor) { editor.root.setAttribute("spellcheck", "false"); } } }, []);