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
view.change should be the only way to get view writer. It should be changed to the class instead of a set of function. It should get all methods to modify the view tree, similar to the model writer, including attributes changes and selection. View writer API should be similar to the model writer with the exception that view writer does not need batches.
At the same time, we should consider splitting view and the document. Making view a general controller of the view and the document focused on what is rendered.
The text was updated successfully, but these errors were encountered:
Other: Refactoring of the view API. Closes #1210.
BREAKING CHANGE: `view.Writer` is no longer an object literal with functions but a class.
BREAKING CHANGE: View controller `view.View` is introduced. Changes to the view document tree structure should be done by using writer provided to callback in `view.change()` method.
BREAKING CHANGE: View document is now separated from the DOM. `view.Renderer`, `view.DomConverter` and observers are moved to `view.View`.
BREAKING CHANGE: `view#event:render` is introduced to indicate a moment when all changes are applied and document may be rendered to the DOM.
BREAKING CHANGE: Downcast converter helpers no longer accepts view elements instances as constructors are now protected. Callbacks using view writer should be used.
mlewand
transferred this issue from ckeditor/ckeditor5-engine
Oct 9, 2019
The only proper way of changing model will be now the model writer in the change block.
From time to time we have a problem with render being not synchronized (see https://github.com/ckeditor/ckeditor5-engine/issues/654#issuecomment-332188800 or https://github.com/ckeditor/ckeditor5-engine/issues/1148). We can solve it in the same way, introducing
view.change
block (see the draft here https://gist.github.com/pjasiun/74b5c4e22b2c60ec17d82918a9663fd0#file-engine-js-L124-L136). Model to view conversion should be done in this block as well as any other view modification. When all changes are done and there are changes in the renderer, view document should be rendered.view.change
should be the only way to get view writer. It should be changed to the class instead of a set of function. It should get all methods to modify the view tree, similar to the model writer, including attributes changes and selection. View writer API should be similar to the model writer with the exception that view writer does not need batches.At the same time, we should consider splitting view and the document. Making view a general controller of the view and the document focused on what is rendered.
The text was updated successfully, but these errors were encountered: