-
-
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
TreeView to TreeModel conversion controller #3544
Comments
Note that TreeView to TreeModel conversion will be called on:
In all cases it is data insertion. In contrast to model -> view conversion it does not need to be able to handle move or deletion. If one select text and pressed "delete" proper controller will map selected range and delete content on the model. No data conversion is needed. |
One of the problems TreeView to TreeModel controller need to handle is incorrect data. It need to do some clean-up based on the registered controllers. This controller work is similar to the ACF in the CKEditor 4. For example if the
|
During the F2F discussion with @scofalik we realised a problem with consuming mechanism. Consider such example. Lets have such view to convert into a model: The cursor is at the begging and convert a
The cursor move and do nothing, because it can not convert
The cursor meet text, transform it:
The cursor stay on text a little longer and check the parent chain, if it finds there a
The same for
Then it moves to the next position and convert
And here we have a problem. it should check the list of parents and consume We need some way to mark |
I think that it's fine that When we look for consumables, we look for things like, i.e., When we look to the parent, the parent element is there for every child, so it's like every child has this special "thing" to consume. From conversion point of view, you could think that The problem appears when two converters would like to convert parent element tag. We will either have to:
|
In short,we need a way to consume part of the element related with certain node. But at the same time it need to be possible to consume whole element, because during view - model conversion we are not able to distinguish between |
consume
- will remove item from that list,isConsumed
- check if the item has been consumed.The text was updated successfully, but these errors were encountered: