diff --git a/src/bundle/Resources/encore/ez.js.config.js b/src/bundle/Resources/encore/ez.js.config.js index 6862c34095..565f2aa98b 100644 --- a/src/bundle/Resources/encore/ez.js.config.js +++ b/src/bundle/Resources/encore/ez.js.config.js @@ -46,6 +46,7 @@ const alloyEditor = [ path.resolve(__dirname, '../public/js/alloyeditor/src/buttons/ez-btn-underline.js'), path.resolve(__dirname, '../public/js/alloyeditor/src/buttons/ez-btn-subscript.js'), path.resolve(__dirname, '../public/js/alloyeditor/src/buttons/ez-btn-superscript.js'), + path.resolve(__dirname, '../public/js/alloyeditor/src/buttons/ez-btn-styleslistitem.js'), path.resolve(__dirname, '../public/js/alloyeditor/src/buttons/ez-btn-quote.js'), path.resolve(__dirname, '../public/js/alloyeditor/src/buttons/ez-btn-strike.js'), path.resolve(__dirname, '../public/js/alloyeditor/src/buttons/ez-btn-link.js'), diff --git a/src/bundle/Resources/public/js/alloyeditor/src/buttons/ez-btn-styleslistitem.js b/src/bundle/Resources/public/js/alloyeditor/src/buttons/ez-btn-styleslistitem.js new file mode 100644 index 0000000000..e452cdf0a8 --- /dev/null +++ b/src/bundle/Resources/public/js/alloyeditor/src/buttons/ez-btn-styleslistitem.js @@ -0,0 +1,37 @@ +import React from 'react'; +import AlloyEditor from 'alloyeditor'; + +export default class EzBtnStylesListItem extends AlloyEditor.ButtonStylesListItem { + /** + * Lifecycle. Renders the UI of the button. + * + * @instance + * @memberof ButtonStylesListItem + * @method render + * @return {Object} The content which should be rendered. + */ + render() { + const className = this.props.name === this.props.activeStyle ? 'ae-toolbar-element active' : 'ae-toolbar-element'; + + return ( +