-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Batch type #3729
Comments
More I think about it more I feel that it might be useful to mark batches which should be ignored in the undo stack. It would work for both initialisation and collaborative editing. For now, we agreed that deltas from other users can be applied without any Also note that creating deltas, without a batch is not an easy task, right now. So for initialisation it would not be the simplest solution. We can not also not put these changes to the history, because then the document version will be different then the number of operations in the history, what can be a reason of issues, especially when you think about collaboration and sending this initial data for other users. |
Also note that re-initialization is a different case. When a use call |
In https://github.com/ckeditor/ckeditor5-typing/issues/7 we realised that changes caused by undo should break typing batch, but changes causes by collaboration should not. This is why be can not put all of them as deltas without a batch. We need to group these changes in batches and created batch types. For now we need special batches for:
|
When we made this change we can consider whether it is a good practice to use for ( let delta of updatedDeltas ) {
for ( let operation of delta.operations ) {
this.editor.document.applyOperation( operation );
}
} This could be change to "transparent" I am writing this because in some places we already made kind-of-an-assumption that we check if applied |
The idea about batch types was that you'll be checking them instead of whether the batch exists or not... so I guess that this means that you'll always need to generate batches. Does it sound feasible? |
Yes, you wrote basically what I wrote. I just wanted to point out that there already might be places that will need to be fixed. |
For now we will stick only with two types:
|
Closed via: ckeditor/ckeditor5-engine#499. |
We need the way to initialise data in the editor. The problem is that on the one hand we need a
change
event, so the data will be converted to the view, but we do not want to have an undo step for the initial data.The text was updated successfully, but these errors were encountered: