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

Implement diffToChanges() – a function which converts diff() output into a applicable deltas #4881

Closed
Reinmar opened this issue Apr 25, 2016 · 0 comments · Fixed by ckeditor/ckeditor5-utils#27
Assignees
Labels
package:utils type:feature This issue reports a feature request (an idea for a new functionality or a missing option).
Milestone

Comments

@Reinmar
Copy link
Member

Reinmar commented Apr 25, 2016

diff() outputs results like:

diff( 'aba', 'acca' ); // [ EQUAL, INSERT, INSERT, DELETE, EQUAL ]

Often, you may need to then generate a set of deltas which transform the left text (current) to the right one (future) or the opposite. However, the output from diffToChanges() should be generic enough (if possible), so it can be used with JS strings or DOM text nodes in a similar way if needed.

First feature which requires this functionality is ckeditor/ckeditor5-typing. I'm not sure there will be more soon, but that's enough.

@Reinmar Reinmar self-assigned this Apr 25, 2016
@Reinmar Reinmar changed the title Implement batchify() – a function which converts diff() output into a applicable deltas Implement diffToChanges() – a function which converts diff() output into a applicable deltas May 9, 2016
@mlewand mlewand transferred this issue from ckeditor/ckeditor5-utils Oct 9, 2019
@mlewand mlewand added this to the v0.1.0 milestone Oct 9, 2019
@mlewand mlewand added type:feature This issue reports a feature request (an idea for a new functionality or a missing option). package:utils labels Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:utils type:feature This issue reports a feature request (an idea for a new functionality or a missing option).
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants