You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The purpose of this change would be to make it possible to use the Mapper in the DataController outside the conversion phase (in my specific case, it would be in a DataProcessor implementation).
Moving the this.mapper.clearBindings()lines to the beginning of the toView() method would make this possible, and hopefully would not conflict with how the editor would behave. I have not tested this solution, therefore the actual solution to the problem could be more difficult.
To create an issue came up in the answer of this question on stackoverflow, and the question contains a more detailed explanation of why I would need this feature.
The text was updated successfully, but these errors were encountered:
It is not recommended to use mapper and model in DataProcessor . It breaks layers separation: data controller should convert between data and view. If any data from the model is needed it should be converted to view earlier.
However, the change you propose looks good. It will be safer for the next conversion to clear bindings at the beginning, and it will let people read mapper biding after the conversion, what, in some cases, is fine.
I'm aware that it is not recommended to use the model, however, it is the best solution to my problem that I was able to come up with. Regardless, this change would help my use case, and if it is unlikely to cause problems for others or more conventional use cases of the editor then I think it would be a good addition to the engine.
Yeah, I understood, I just felt the need to add the standard disclaimer that I know you don't recommend doing what I'm doing (although I probably should start with that with all my CKE5 questions). :)
Other: Allowed using `Mapper` outside the conversion scope. Closes #1415.
Thanks to [Mate Bartus](https://github.com/CHItA) for this contribution!
mlewand
transferred this issue from ckeditor/ckeditor5-engine
Oct 9, 2019
The purpose of this change would be to make it possible to use the
Mapper
in theDataController
outside the conversion phase (in my specific case, it would be in aDataProcessor
implementation).Moving the
this.mapper.clearBindings()
lines to the beginning of thetoView()
method would make this possible, and hopefully would not conflict with how the editor would behave. I have not tested this solution, therefore the actual solution to the problem could be more difficult.To create an issue came up in the answer of this question on stackoverflow, and the question contains a more detailed explanation of why I would need this feature.
The text was updated successfully, but these errors were encountered: