Skip to content
Permalink
Browse files

fix: make div in table when replaceContent is executed (fix: #535)

  • Loading branch information...
sohee-lee7 committed Jun 11, 2019
1 parent 793c3ec commit c1c163b20e153b86c2e4028ee4ae621215d18d0a
Showing with 8 additions and 0 deletions.
  1. +8 −0 src/js/wwTextObject.js
@@ -116,6 +116,14 @@ class WwTextObject {
replaceContent(content) {
this._wwe.getEditor().setSelection(this._range);
this._wwe.getEditor().insertHTML(content);

// When range is in table, 'insertHTML' makes div in table.
// So after 'insertHTML', div in table should be unwrap.
// 'wysiwygRangeChangeAfter' event let wwTableManager call '_unwrapBlockInTable'
if (this._wwe.isInTable(this._range)) {
this._wwe.eventManager.emit('wysiwygRangeChangeAfter', this._wwe);
}

this._range = this._wwe.getRange();
}

0 comments on commit c1c163b

Please sign in to comment.
You can’t perform that action at this time.