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
Right now the model is created in the Editor class, editing view in StandardEditor, model root is created in a creator class (i.e. ClassicEditor) and view root is created in a creators UI (i.e. ClassicEditorUI). Mess.
First of all, in the Editor class model should be created with both controllers, so:
should be moved to from the StandardEditor to the Editor class. At the same time we could move keystrokes handler to the editor class keeping the whole initialisation in the one place.
Second issue is how roots should be initialised.
I believe that the default model root should be initialised in the Editor class too. More problematic is where (when) editing view root should be inited since it expect dom element to be defined. This is why I think that we could handle it a little bit different. Editing controllers could bind model roots collection (it need to become observable) and editing view roots collection, so it will be enought to create root on the model to have it in the editing view too. This way editing view will be created as soon as it should be created (see #647).
Binding editing view root and DOM element can be done later. It means that the binding will not be needed when view root will be created (it should work fine, I hope). Editing view document have attachDomRoot method which can be called later.
The text was updated successfully, but these errors were encountered:
Right now the model is created in the
Editor
class, editing view inStandardEditor
, model root is created in a creator class (i.e.ClassicEditor
) and view root is created in a creators UI (i.e.ClassicEditorUI
). Mess.First of all, in the
Editor
class model should be created with both controllers, so:https://github.com/ckeditor/ckeditor5-core/blob/f7bc3cfe65a6a000395ca9b5242603ffd2f92e14/src/editor/standardeditor.js#L44-L45
should be moved to from the
StandardEditor
to theEditor
class. At the same time we could move keystrokes handler to the editor class keeping the whole initialisation in the one place.Second issue is how roots should be initialised.
I believe that the default model root should be initialised in the
Editor
class too. More problematic is where (when) editing view root should be inited since it expect dom element to be defined. This is why I think that we could handle it a little bit different. Editing controllers could bind model roots collection (it need to become observable) and editing view roots collection, so it will be enought to create root on the model to have it in the editing view too. This way editing view will be created as soon as it should be created (see #647).Binding editing view root and DOM element can be done later. It means that the binding will not be needed when view root will be created (it should work fine, I hope). Editing view document have
attachDomRoot
method which can be called later.The text was updated successfully, but these errors were encountered: