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
Hi,
I'm using Tiptap with the collaboration extension, where I save both the collaborative document and the editor content to a database.
The issue arises when saving the editor content fails. In such cases, I want to revert the user's changes to prevent the collaborative document from becoming unsynchronized with the database state.
I tried using editor.commands.undo(), but it only reverts the last change. For example, if the user makes multiple changes and the save request fails, calling undo() doesn't restore the editor to its original state—it only reverts the most recent change.
Is there a way to reset the editor content to the original state (before any changes were made) if the save operation fails?
On the other inputs with collaboration I'm currently using the undoManager which seems to work pretty well for my purpose but for tiptap I couldn't integrate that
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I'm using Tiptap with the collaboration extension, where I save both the collaborative document and the editor content to a database.
The issue arises when saving the editor content fails. In such cases, I want to revert the user's changes to prevent the collaborative document from becoming unsynchronized with the database state.
I tried using editor.commands.undo(), but it only reverts the last change. For example, if the user makes multiple changes and the save request fails, calling undo() doesn't restore the editor to its original state—it only reverts the most recent change.
Is there a way to reset the editor content to the original state (before any changes were made) if the save operation fails?
On the other inputs with collaboration I'm currently using the undoManager which seems to work pretty well for my purpose but for tiptap I couldn't integrate that
Beta Was this translation helpful? Give feedback.
All reactions