How to use the alloyeditor.EzBtnStylesListItem function in alloyeditor

To help you get started, we’ve selected a few alloyeditor examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ezsystems / ezplatform-richtext / src / bundle / Resources / public / js / OnlineEditor / buttons / ez-btn-styleslistitem.js View on Github external
const attrsToRemove = ['ezelement', 'eztype', 'ezname'];
        const targetName = this.props.style.attributes ? this.props.style.attributes['data-ezname'] : '';

        if (block.$.dataset.eztype === 'style' && block.$.dataset.ezname !== targetName) {
            attrsToRemove.forEach(attr => block.$.removeAttribute(`data-${attr}`));
        }
    }

    fireCustomUpdateEvent() {
        const nativeEditor = this.props.editor.get('nativeEditor');

        nativeEditor.fire('customUpdate');
    }
}

AlloyEditor.ButtonStylesListItem = AlloyEditor.EzBtnStylesListItem = EzBtnStylesListItem;

const eZ = (window.eZ = window.eZ || {});

eZ.ezAlloyEditor = eZ.ezAlloyEditor || {};
eZ.ezAlloyEditor.ezBtnStylesListItem = EzBtnStylesListItem;
github ezsystems / ezplatform-admin-ui / src / bundle / Resources / public / js / alloyeditor / src / buttons / ez-btn-styleslistitem.js View on Github external
const attrsToRemove = ['ezelement', 'eztype', 'ezname'];
        const targetName = this.props.style.attributes ? this.props.style.attributes['data-ezname'] : '';

        if (block.$.dataset.eztype === 'style' && block.$.dataset.ezname !== targetName) {
            attrsToRemove.forEach(attr => block.$.removeAttribute(`data-${attr}`));
        }
    }

    fireCustomUpdateEvent() {
        const nativeEditor = this.props.editor.get('nativeEditor');

        nativeEditor.fire('customUpdate');
    }
}

AlloyEditor.ButtonStylesListItem = AlloyEditor.EzBtnStylesListItem = EzBtnStylesListItem;
eZ.addConfig('ezAlloyEditor.ezBtnStylesListItem', EzBtnStylesListItem);