-
-
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
Mark model changes which do not affect data #4348
Comments
This is "Solution 2" from https://github.com/ckeditor/ckeditor5-autosave/issues/1. |
I thought that I wanted to argue that I like a flag in |
While adding Should I add the |
Yep. It seems to be the way to go. |
Am I right and it only makes sense to fire |
Answering my own question, no, I'm not. A marker that exists only in the |
Feature: Introduced `ModelDocument#change:data` event. Closes #1418.
There are model changes which do not affect data: selection change, some markers. At the moment, there is no easy way to learn if the change touches data what makes integrations much harder.
First, we should introduce marker API to tell if that marker change touches data. I propose to call it
affectsData
(true
by default). It should be a property inoptions
parameter inaddMarker
andupdateMarker
. If the value is set it should be the same for all further operations, as long as it is not changed.Then, we need to have an easy way to get only these
change
events which affect data. I propose to introducechange:data
event. It will be called for all changes which affect data. If the change will contain only selection change, or markers which do not affect data, thenchange
event should be fired. In all other cases, when data can changechange:data
should be fired.The text was updated successfully, but these errors were encountered: