Skip to content

Commit

Permalink
fix plus button
Browse files Browse the repository at this point in the history
  • Loading branch information
dew326 committed Mar 1, 2019
1 parent 4326b30 commit 874a368
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,11 @@ export default class EzToolbarAdd extends AlloyEditor.Toolbars.add {
* @return {Object} The content which should be rendered.
*/
render() {
const selectionData = this.props.selectionData;
const { selectionData, editor } = this.props;
const path = editor.get('nativeEditor').elementPath();
const isInlineCustomTag = path && path.contains((element) => element.$.dataset.ezelement === 'eztemplateinline');

if (selectionData && selectionData.text) {
if ((selectionData && selectionData.text) || isInlineCustomTag) {
return null;
}

Expand Down

0 comments on commit 874a368

Please sign in to comment.