瀏覽代碼

Enabled automatic toolbar grouping when items start overflow.

Aleksander Nowodzinski 6 年之前
父節點
當前提交
f2cf37bc40
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      packages/ckeditor5-editor-decoupled/src/decouplededitorui.js

+ 5 - 0
packages/ckeditor5-editor-decoupled/src/decouplededitorui.js

@@ -115,6 +115,7 @@ export default class DecoupledEditorUI extends EditorUI {
 		const toolbar = view.toolbar;
 
 		toolbar.fillFromConfig( this._toolbarConfig.items, this.componentFactory );
+		toolbar.shouldGroupWhenFull = true;
 
 		enableToolbarKeyboardFocus( {
 			origin: editor.editing.view,
@@ -122,6 +123,10 @@ export default class DecoupledEditorUI extends EditorUI {
 			originKeystrokeHandler: editor.keystrokes,
 			toolbar
 		} );
+
+		this.on( 'update', () => {
+			toolbar.update();
+		} );
 	}
 
 	/**