Skip to content

Commit

Permalink
fix: 修复表格中选中文字插入链接多出table标签和chrome浏览器表格高度问题
Browse files Browse the repository at this point in the history
  • Loading branch information
chenxiaoleizi committed Aug 21, 2021
1 parent c89cd4c commit 325f1f6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/assets/style/text.less
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
border-right: 1px solid #ccc;
padding: 3px 5px;
min-height: 30px;
height: 30px;
}

th {
Expand Down
2 changes: 1 addition & 1 deletion src/menus/link/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ function getContainerTag(node: Node): Node[] {
const topText = node.textContent ?? ''
let tagArr = []
while (node?.textContent === topText) {
if (node.nodeName !== 'P') {
if (node.nodeName !== 'P' && node.nodeName !== 'TABLE') {
tagArr.push(node)
}
node = node.childNodes[0]
Expand Down

0 comments on commit 325f1f6

Please sign in to comment.