|
@@ -57,7 +57,17 @@ export default class ClassicEditorUI extends EditorUI {
|
|
|
|
|
|
|
|
this.focusTracker.add( this.view.editableElement );
|
|
this.focusTracker.add( this.view.editableElement );
|
|
|
|
|
|
|
|
- this.view.toolbar.fillFromConfig( this._toolbarConfig.items, this.componentFactory );
|
|
|
|
|
|
|
+ view.toolbar.fillFromConfig( this._toolbarConfig.items, this.componentFactory );
|
|
|
|
|
+
|
|
|
|
|
+ editor.on( 'ready', () => {
|
|
|
|
|
+ // This feature should not be enabled earlier because for the algorithm to work,
|
|
|
|
|
+ // the toolbar must be visible in DOM (i.e. only after #uiReady).
|
|
|
|
|
+ // But that's not all: the editor content must also be ready because loading it into
|
|
|
|
|
+ // editable can make the vertical website scrollbar to show up (it is usually styled
|
|
|
|
|
+ // differently in the website and in the editor; it can "grow" a lot). And that would
|
|
|
|
|
+ // reduce the horizontal space available for toolbar items. In other words, later is better.
|
|
|
|
|
+ view.toolbar.enableWrappedItemsGroupping();
|
|
|
|
|
+ } );
|
|
|
|
|
|
|
|
enableToolbarKeyboardFocus( {
|
|
enableToolbarKeyboardFocus( {
|
|
|
origin: editor.editing.view,
|
|
origin: editor.editing.view,
|