|
|
@@ -13,6 +13,7 @@ import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
|
|
|
import Model from '@ckeditor/ckeditor5-ui/src/model';
|
|
|
import createListDropdown from '@ckeditor/ckeditor5-ui/src/dropdown/list/createlistdropdown';
|
|
|
import Collection from '@ckeditor/ckeditor5-utils/src/collection';
|
|
|
+import Template from '@ckeditor/ckeditor5-ui/src/template';
|
|
|
|
|
|
import '../theme/theme.scss';
|
|
|
|
|
|
@@ -88,6 +89,14 @@ export default class Heading extends Plugin {
|
|
|
editor.ui.componentFactory.add( 'headings', ( locale ) => {
|
|
|
const dropdown = createListDropdown( dropdownModel, locale );
|
|
|
|
|
|
+ Template.extend( dropdown.template, {
|
|
|
+ attributes: {
|
|
|
+ class: [
|
|
|
+ 'ck-heading-dropdown'
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ } );
|
|
|
+
|
|
|
// Execute command when an item from the dropdown is selected.
|
|
|
this.listenTo( dropdown, 'execute', ( evt ) => {
|
|
|
editor.execute( evt.source.commandName );
|