Przeglądaj źródła

Enabled automatic toolbar grouping when items start overflow.

Aleksander Nowodzinski 6 lat temu
rodzic
commit
f2cf37bc40

+ 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();
+		} );
 	}
 
 	/**