Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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;
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);