@@ -138,6 +138,8 @@ export default class BalloonToolbar extends Plugin {
const factory = this.editor.ui.componentFactory;
this.toolbarView.fillFromConfig( config.items, factory );
+
+ this.toolbarView.label = this.editor.t( config.label );
}
/**
@@ -29,19 +29,24 @@
* @returns {Object} A normalized toolbar config object.
*/
export default function normalizeToolbarConfig( config ) {
+ const defaultLabel = 'Editor\'s toolbar';
if ( Array.isArray( config ) ) {
return {
- items: config
+ items: config,
+ label: defaultLabel
};
if ( !config ) {
- items: []
+ items: [],
return Object.assign( {
}, config );