-
Notifications
You must be signed in to change notification settings - Fork 131
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
Could we have an undoCompose
function? For calculating the reverse of a delta when composed with a base delta.
#28
Comments
Quill's clipboard module deliberately does not want to store all baseDeltas (which would be the entire document). Also its clipboard deals with insert-only deltas which can use |
Right, you wouldn't be storing the
you can do
|
I see what you mean now. |
Yup, I'd definitely be willing to contribute a PR. I'd much rather have it live here, because quill is tied to the dom, and this |
Great thanks! Let me know when there is something to look at or if you have questions getting started. |
Hey is this something you are still planning on working on? We were planning on adding this soon if not. |
I haven't gotten to this yet, it's a little farther down on my priority list |
E.g. this would make undo simpler / faster.
The quilljs history module has a guessUndoDelta, which can only guess the undo of an insert, understandably -- you need the base delta to be able to calculate the undo of a delete, for example.
So I'm envisioning a
delta.undoCompose(baseDelta)
such that the following holds true for any delta:The text was updated successfully, but these errors were encountered: