Skip to content

Commit

Permalink
Merge pull request #899 from dew326/ezp-30287-cannot-add-custom-tag-t…
Browse files Browse the repository at this point in the history
…o-table

EZP-30287: Cannot add inline custom tag to table
  • Loading branch information
Łukasz Serwatka committed Mar 15, 2019
2 parents 17d6d4f + a71c433 commit 574fc27
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -24,8 +24,12 @@ export default class EzBtnInlineCustomTagUpdate extends EzBtnCustomTagUpdate {
widget.setFocused(true);

if (createNewTag) {
const firstChild = selection.getFirst();
const isNodeElement = firstChild.type === CKEDITOR.NODE_ELEMENT;
const content = isNodeElement && firstChild.is('table') ? selection.$.textContent : selection.getHtml();

widget.setName(this.customTagName);
widget.setWidgetContent(selection.getHtml());
widget.setWidgetContent(content);
widget.renderIcon();
}

Expand Down

0 comments on commit 574fc27

Please sign in to comment.