|
|
@@ -29,20 +29,24 @@ export default class ClassicEditorUI extends BoxedEditorUI {
|
|
|
super( editor );
|
|
|
|
|
|
/**
|
|
|
- * Toolbar controller.
|
|
|
+ * Editable UI controller.
|
|
|
*
|
|
|
* @readonly
|
|
|
- * @member {ui.toolbar.Toolbar} editor-classic.ClassicEditorUI#toolbar
|
|
|
+ * @member {ui.editableUI.EditableUI} editor-classic.ClassicEditorUI#editable
|
|
|
*/
|
|
|
- this.toolbar = this._createToolbar();
|
|
|
+ this.editable = this._createEditableUI();
|
|
|
+ }
|
|
|
|
|
|
+ init() {
|
|
|
/**
|
|
|
- * Editable UI controller.
|
|
|
+ * Toolbar controller.
|
|
|
*
|
|
|
* @readonly
|
|
|
- * @member {ui.editableUI.EditableUI} editor-classic.ClassicEditorUI#editable
|
|
|
+ * @member {ui.toolbar.Toolbar} editor-classic.ClassicEditorUI#toolbar
|
|
|
*/
|
|
|
- this.editable = this._createEditableUI();
|
|
|
+ this.toolbar = this._createToolbar( this.editor.ui.view.element );
|
|
|
+
|
|
|
+ return super.init();
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -61,7 +65,7 @@ export default class ClassicEditorUI extends BoxedEditorUI {
|
|
|
* @protected
|
|
|
* @returns {ui.toolbar.Toolbar}
|
|
|
*/
|
|
|
- _createToolbar() {
|
|
|
+ _createToolbar( editorUiElement ) {
|
|
|
const editor = this.editor;
|
|
|
const model = new Model( {
|
|
|
config: this.editor.config.get( 'toolbar' )
|
|
|
@@ -69,7 +73,7 @@ export default class ClassicEditorUI extends BoxedEditorUI {
|
|
|
|
|
|
model.bind( 'isActive' ).to( editor.editing.view.getRoot(), 'isFocused' );
|
|
|
|
|
|
- const toolbar = new StickyToolbar( model, new StickyToolbarView( editor.locale ), editor );
|
|
|
+ const toolbar = new StickyToolbar( model, new StickyToolbarView( editor.locale, editorUiElement ), editor );
|
|
|
this.add( 'top', toolbar );
|
|
|
|
|
|
return toolbar;
|