Open rwlaschin opened 4 years ago
One more thing that I forgot. My app created two instances of the editor because I have multiple places this is being used. One is for editing tips the other is for articles.
Hello, I believe that this is normal behaviour. onChange
is being called each time it is changed. When you add a new character in the editor, that newly added character is registered as a change to the function.
What problems are you facing when onChange
is being called each time a new character is added?
Version
"@toast-ui/react-editor": "^1.0.0",
Test Environment
mac mojave 10.14.5 chrome 80.0.3987.100 (Official Build) (64-bit)
Current Behavior
Using the onChange function is called once per character in edit window
ie. type 'a' -> onChange is called once type 'a' (now you have aa) -> onChange is called twice type 'a' (now you have aaa) -> onChange is called n times ... if you have 20 characters '12345678901234567890 and type 'a' -> onChange is called a lot of times
Here's a image with 63 calls with only adding an 'a' to the string above.
I've had this installed for 9 months with no changes and recently updated and now I am seeing this issue. It's possible this was a latent issue due to my setup. If you see something wrong with my setup please let me know.
This is a live app so I can show you. Let me know when you have time.
Here's my component
Expected Behavior