You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that if initialState is given to CollaborationPlugin and client didnt receive any content when syncing with backend it adds initialState to the editorState. Problem is that this initialState to editorState addition also creates new row to undoManager's undoStack and therefore can be undoed. It kinda feels strange to be able to undo initialState off.
Also as far as i know, this works differently compared to normal initialState of editor (without collab) where initialState is not part of the history stack and therefore cant be undoed.
It's kinda annoying in my own case where I give certain node layout to initialState. This layout shouldnt be edited in any way, but now user can still press undo and remove it completly. I have made patch file in my project to add clearHistory call after initialState has been set, but of course this would be better if it was supported by library itself.
Lexical version: 0.23.1
The current behavior
CollaborationPlugin's initialState can be undoed
The expected behavior
CollaborationPlugin's initialState should not be able to be undoed
The text was updated successfully, but these errors were encountered:
It seems that if initialState is given to CollaborationPlugin and client didnt receive any content when syncing with backend it adds initialState to the editorState. Problem is that this initialState to editorState addition also creates new row to undoManager's undoStack and therefore can be undoed. It kinda feels strange to be able to undo initialState off.
Also as far as i know, this works differently compared to normal initialState of editor (without collab) where initialState is not part of the history stack and therefore cant be undoed.
It's kinda annoying in my own case where I give certain node layout to initialState. This layout shouldnt be edited in any way, but now user can still press undo and remove it completly. I have made patch file in my project to add clearHistory call after initialState has been set, but of course this would be better if it was supported by library itself.
Lexical version: 0.23.1
The current behavior
CollaborationPlugin's initialState can be undoed
The expected behavior
CollaborationPlugin's initialState should not be able to be undoed
The text was updated successfully, but these errors were encountered: