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

Undo after replacing selected text with mark is bringing back mark incorrectly and throws exceptions afterwards #379

Open
oskar-szwajkowski opened this issue Nov 29, 2022 · 3 comments

Comments

@oskar-szwajkowski
Copy link

I am having setup with plate editor + yjs + yjshistory and cursor, basically all plugins that can be put there are working together

It is working for some time already without problems, but I have run into case when it breaks when selected text contains marks, and then we Undo (ctrl + z)

Suddenly more text than before contains this mark, and when we click on it, it throws Path doesn't match yText, yTarget spans multiple nodes

Similar error has thrown when I tried to create plugin which wraps around slate's insertText and was doing removeMark + insertText, because I have some functionality that works as marks, but I do not want it to be transfered to newly typed text as rest of marks are doing, everything is fine until I do Undo, which is then adding this mark to some additional text and it breaks

It can also be reproduced on slate-yjs demo page Slate-yjs Playground page

Video of this issue:

video1313409905.mp4
@arekczarny
Copy link

This is what we also see in our project. Would be great to have this one resolved.

@hakanshehu
Copy link

@oskar-szwajkowski were you able to find a workaround for this one?

@oskar-szwajkowski
Copy link
Author

@oskar-szwajkowski were you able to find a workaround for this one?

Not really, I am not working with slate anymore, so honestly I forgot about this issue

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

No branches or pull requests

3 participants