Skip to content
Permalink
Browse files

fix: enter make blank line at end of the styled text(ex: bold) in the…

… list of table
  • Loading branch information...
Sohee Lee
Sohee Lee committed May 17, 2019
1 parent 0e271bd commit 3a03f7ef1f1e159ea79527a42d7d7774e8101553
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/js/wwTableManager.js
@@ -183,7 +183,7 @@ class WwTableManager {
this.wwe.breakToNewDefaultBlock(range, 'before');
isNeedNext = false;
} else if (this.wwe.isInTable(range)) {
if (this._isInStyledText(range)) {
if (!this._isInList(range.startContainer) && this._isInStyledText(range)) {
this.wwe.defer(() => {
this._removeBRinStyleText();
});
@@ -445,6 +445,12 @@ class WwTableManager {
}
}

_isInList(targetNode) {
return domUtils.getParentUntilBy(targetNode,
(node) => node && (domUtils.isListNode(node) || node.nodeName === 'LI'),
(node) => node && (node.nodeName === 'TD' || node.nodeName === 'TH'));
}

/**
* Find LI node while search parentNode inside TD
* @param {node} startContainer startContainer

0 comments on commit 3a03f7e

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