Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inspect meta of appendedTransaction for possible addToHistory:false #142

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

romansp
Copy link

@romansp romansp commented Sep 13, 2023

Resolves #141.

Using the same approach as in native prosemirror-history, added inspection of appendedTransaction meta for possible addToHistory: false to prevent root transaction from appearing on the undo/redo stack.

Added a test case that covers expected behavior.

…ase if custom plugin issued transaction via `appendTransaction`
… to prevent transaction from appearing on undo stack. fixes yjs#141
@romansp romansp changed the title Inspect meta of appendedTransaction for possible `addToHistory:false Inspect meta of appendedTransaction for possible addToHistory:false Sep 13, 2023
@BrianHung
Copy link
Contributor

Great fix for developers trying to chain multiple commands together but only have one undo / redo for all using the appendedTransaction meta.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ySyncPlugin ignores addToHistory:false meta of appendedTransaction
2 participants