Closed yuer0608 closed 7 months ago
Ref: INT-3163
I cannot replicate it, can you provide use an example and the step by step instructions to replicate it?
also version of the editor and the browser are you using, could be a very useful information
This problem is likely due to the way the component updates its internal state.
The issue is related to how the TinyMCE editor's state is being managed in the parent component. Since the parent component is re-rendering, it's causing the cursor to jump back to the beginning of the content.
I agree with @duongnq2798, closing.
I think this is indeed related to state management of the parent component but the thing that may be confusing is the naming of properties for the Editor, or how it works.
I found that changing initialValue={initialValue}, i.e. changing the variable intialValue results in precisely the above behavior, i.e. the cursor jumps to the beginning of the editor.
In my case the fix was not to update the initialValue
@hubertlepicki Correct, you can see https://www.tiny.cloud/docs/tinymce/6/react-ref/#initialvalue for more info.
My code is similar that
everytime, the cursor will to the first position when I edit content after. how I do ?