|
1 | | -import EditorUI from '@ckeditor/ckeditor5-core/src/editor/editorui'; |
2 | | -import enableToolbarKeyboardFocus from '@ckeditor/ckeditor5-ui/src/toolbar/enabletoolbarkeyboardfocus'; |
| 1 | +import EditorUI from '@ckeditor/ckeditor5-ui/src/editorui/editorui'; |
3 | 2 | import { enablePlaceholder } from '@ckeditor/ckeditor5-engine/src/view/placeholder'; |
4 | 3 |
|
5 | 4 | /** |
@@ -69,11 +68,6 @@ export default class MultirootEditorUI extends EditorUI { |
69 | 68 | // Register each editable UI view in the editor. |
70 | 69 | this.setEditableElement(editable.name, editableElement); |
71 | 70 |
|
72 | | - // Let the global focus tracker know that the editable UI element is focusable and |
73 | | - // belongs to the editor. From now on, the focus tracker will sustain the editor focus |
74 | | - // as long as the editable is focused (e.g. the user is typing). |
75 | | - this.focusTracker.add(editableElement); |
76 | | - |
77 | 71 | // Let the editable UI element respond to the changes in the global editor focus |
78 | 72 | // tracker. It has been added to the same tracker a few lines above but, in reality, there are |
79 | 73 | // many focusable areas in the editor, like balloons, toolbars or dropdowns and as long |
@@ -137,18 +131,10 @@ export default class MultirootEditorUI extends EditorUI { |
137 | 131 | * @private |
138 | 132 | */ |
139 | 133 | _initToolbar() { |
140 | | - const editor = this.editor; |
141 | | - const view = this.view; |
142 | | - const toolbar = view.toolbar; |
| 134 | + const toolbar = this.view.toolbar; |
143 | 135 |
|
144 | | - toolbar.fillFromConfig(editor.config.get('toolbar'), this.componentFactory); |
145 | | - |
146 | | - enableToolbarKeyboardFocus({ |
147 | | - origin: editor.editing.view, |
148 | | - originFocusTracker: this.focusTracker, |
149 | | - originKeystrokeHandler: editor.keystrokes, |
150 | | - toolbar |
151 | | - }); |
| 136 | + toolbar.fillFromConfig(this.editor.config.get('toolbar'), this.componentFactory); |
| 137 | + this.editor.ui.addToolbar(toolbar) |
152 | 138 | } |
153 | 139 |
|
154 | 140 | /** |
|
0 commit comments