h-yabi2 / react-quill

react-quill × Next.js
0 stars 0 forks source link

タブ操作時にQuill内にフォーカスが入るとインデントが適用されてしまう問題 #29

Open h-yabi2 opened 1 month ago

h-yabi2 commented 1 month ago

解決コード

  useEffect(() => {
    const removeTabBinding = () => {
      if (quillRef.current === null) {
        return
      }
      const keyboard = quillRef.current.getEditor().getModule('keyboard')
      delete keyboard.bindings[9]
    }
    removeTabBinding()
  }, [quillRef])

参考