Hello, I'm Kwangmook Jung, and I'm trying to apply the @toast-ui/react-editor package to my in-house React project.
The version of the package I'm applying is 3.2.2.
The reason why I'm contacting you this time is that when I add a table through the editor toolbar in the applied editor, the cursor cannot move outside the table.
The mouse cursor can be moved outside the table by clicking the down button on the keyboard, but it may be inconvenient for users who use the service, so I tried several methods.
First, I tried selecting the DOM element directly and defocusing it.
Secondly, I tried to detect the change in the nodeList value below when adding a table element and add a br tag to the end of the table element with useEffect to avoid focusing.
The first is something we want to avoid as much as possible, but it hasn't worked well for us.
In the second case, after creating a table, the cursor does not move outside the table again when I press the keyboard up key.
I respectfully ask if you could take a look at these issues if you can.
Thank you for taking the time to look into this in your busy schedule.
Screenshots
If applicable, add screenshots to help explain your question.
Summary
Hello, I'm Kwangmook Jung, and I'm trying to apply the @toast-ui/react-editor package to my in-house React project.
The version of the package I'm applying is 3.2.2.
The reason why I'm contacting you this time is that when I add a table through the editor toolbar in the applied editor, the cursor cannot move outside the table.
The mouse cursor can be moved outside the table by clicking the down button on the keyboard, but it may be inconvenient for users who use the service, so I tried several methods.
First, I tried selecting the DOM element directly and defocusing it.
Secondly, I tried to detect the change in the nodeList value below when adding a table element and add a br tag to the end of the table element with useEffect to avoid focusing.
The first is something we want to avoid as much as possible, but it hasn't worked well for us. In the second case, after creating a table, the cursor does not move outside the table again when I press the keyboard up key.
I respectfully ask if you could take a look at these issues if you can.
Thank you for taking the time to look into this in your busy schedule.
Screenshots
If applicable, add screenshots to help explain your question.
Version
3.2.2
Additional context
μλ νμΈμ. @toast-ui/react-editor ν¨ν€μ§λ₯Ό μ¬μ©νμ¬ μ¬λ΄ 리μ‘νΈ νλ‘μ νΈμ μ μ©μ μλνκ³ μλ μ κ΄λ¬΅ μ΄λΌκ³ ν©λλ€.
μ μ©μ€μΈ ν¨ν€μ§μ λ²μ μ 3.2.2 λ²μ μ λλ€.
λ€λ¦ μλλΌ μ΄λ²μ λ¬Έμλ₯Ό λλ¦¬κ² λ μ΄μ λ μ μ©ν μλν°μμ μλν° ν΄λ°λ₯Ό ν΅ν΄ ν μ΄λΈμ λ£μμ λ, 컀μκ° ν μ΄λΈ λ°κΉ₯μΌλ‘ μ΄λν μ μλ μ΄μκ° μμ΄μ μ λλ€.
ν€λ³΄λμμ λ°©ν₯ν€ (down) λ²νΌμ ν΄λ¦μ λ§μ°μ€ 컀μκ° ν μ΄λΈ λ°κΉ₯μΌλ‘ μ΄λν μ μμ΅λλ€λ§, μλΉμ€λ₯Ό μ¬μ©νλ μ¬μ©μλ€λ‘μλ μ무λλ λΆνΈν¨μ΄ μμ μ μκΈ° λλ¬Έμ μ¬λ¬ μλλ₯Ό ν΄λ³΄μμ΅λλ€.
첫 λ²μ§Έλ‘λ dom μμλ₯Ό μ§μ μ νν΄μ ν¬μ»€μ±μ ν΄μ νλ λ°©μμ μλν΄ λ³΄μκ³
λ λ²μ§Έλ‘λ ν μ΄λΈ μμλ₯Ό μΆκ°ν λ μλ nodeList κ°μ λ³νκ° μκΈ°λ κ²μ κ°μ§νκ³ useEffect λ₯Ό κ°μ§κ³ table μ μμ λ§μ§λ§μ br νκ·Έλ₯Ό μΆκ°ν΄μ ν¬μ»€μ±μ νΌνλ λ°©μμ μλν΄ λ³΄μμ΅λλ€.
첫λ²μ§Έ λ°©μμ κ°κΈμ νΌνκ³ μΆμ λ°©μμ΄μ§λ§, μ μ©μ΄ μ λμ§ μμκ³ λλ²μ§Έ λ°©μμ ν μ΄λΈ νλλ₯Ό μμ± ν ν€λ³΄λ μν₯ λ°©ν₯ν€ λ₯Ό λλ μ λ λ€μ 컀μκ° ν μ΄λΈ λ°κΉ₯μΌλ‘ μ΄λμ΄ λμ§ μλ μ΄μκ° μμ΅λλ€.
νΉμ κ°λ₯νλ€λ©΄ ν΄λΉ μ΄μμ λν΄ νμΈν΄ μ£Όμ€ μ μμμ§ μ μ€ν μ¬μ€λ΄ λλ€.
λ°μμ μμ€μ λ΄μ©μ νμΈν΄ μ£Όμ μ κ°μ¬ν©λλ€.