Replies: 1 comment 1 reply
-
Storing metadata on the root node will be possible after #7117 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We have a collaborative app. For reactivity of our lexical state, we tried
LexicalCollaborationPlugin
, but after a couple of months of using it, we had some bugs/strange behaviors with our custom y-websocket server.In the end, we decided to move from
LexicalCollaborationPlugin
to a customReactiveUpdatePlugin
that updates the editor state based on a timestamp difference between the local state and server state, also keeping the cursor.Of course, it is not the same feature-rich as
LexicalCollaborationPlugin
, and it may have some different behavior but it's working nicely for us.I was thinking that other projects may also benefit from using this plugin, in case they need simple reactivity (and not the whole feature set of LexicalCollaborationPlugin and managing y-websocket server)
However, the implementation relies on the local state and a timestamp (when serializedEditorState was changed) field in DB alongside serializedEditorState.
To make
ReactiveUpdatePlugin
a plug-and-play, would be nice to have this timestamp stored inside serializedEditorState (most likely in RootNode? Or maybe a decorator node that will always stay in the serializedEditorState?🤔)If there are some ideas on how to persist this timestamp in the EditorState and serializedEditorState, I may try them with our implementation of
ReactiveUpdatePlugin
and submit a PR with new plugin.cc @ivailop7 @etrepum
Beta Was this translation helpful? Give feedback.
All reactions