Skip to content

Commit

Permalink
fix: 表格下方无序有序列表无法删除问题
Browse files Browse the repository at this point in the history
  • Loading branch information
yu530feng committed Nov 23, 2022
1 parent b35f503 commit f09be2a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/table-module/src/module/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,10 @@ function withTable<T extends IDomEditor>(editor: T): T {
const before = Editor.before(newEditor, selection) // 前一个 location
if (before) {
const isTableOnBeforeLocation = isTableLocation(newEditor, before) // before 是否是 table
const isTableOnCurSelection = isTableLocation(newEditor, selection) // 当前是否是 table
if (isTableOnBeforeLocation && !isTableOnCurSelection) {
return // 如果当前不是 table ,前面是 table ,则不执行删除。否则会删除 table 最后一个 cell

// 如果前面是 table, 当前是空 p,则不执行删除。否则会删除 table 最后一个 cell
if (isTableOnBeforeLocation && core.DomEditor.isSelectedEmptyParagraph(newEditor)) {
return
}
}
}
Expand Down

0 comments on commit f09be2a

Please sign in to comment.