Reputation: 175
I have an editor made with draftjs
. If I have previous content, it is filled with that content.
I need to track the clicks. When I click, for example, in the middle of the content and start writing, I will write at the beginning of the editor ... :/
How can I do that?
Upvotes: 1
Views: 342
Reputation: 1485
Your component must have been re-rendering some how when you start typing in it. You should stop that re-render or may be assign the newly got state to the Editor if it re-renders
Upvotes: 2