浏览代码

Used the new toolbar grouping API in the UI.

Aleksander Nowodzinski 6 年之前
父节点
当前提交
fc86066576
共有 1 个文件被更改,包括 1 次插入10 次删除
  1. 1 10
      packages/ckeditor5-editor-classic/src/classiceditorui.js

+ 1 - 10
packages/ckeditor5-editor-classic/src/classiceditorui.js

@@ -148,18 +148,9 @@ export default class ClassicEditorUI extends EditorUI {
 			view.stickyPanel.viewportTopOffset = this._toolbarConfig.viewportTopOffset;
 		}
 
+		view.toolbar.isGrouping = true;
 		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( {
 			origin: editingView,
 			originFocusTracker: this.focusTracker,