Skip to content

Commit

Permalink
fix(table): allow parsing for TH elements in table module (#531)
Browse files Browse the repository at this point in the history
* fix(table): allow parsing for TH elements in table module

* fix(table): 允许在表格模块中解析 TH 元素
  • Loading branch information
cycleccc authored Feb 5, 2025
1 parent cc3bcbe commit 3f6d567
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .changeset/hip-hairs-tell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@wangeditor-next/editor': patch
'@wangeditor-next/table-module': patch
---

fix(table): allow parsing for TH elements in table module
2 changes: 1 addition & 1 deletion packages/table-module/src/module/parse-style-html.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const DEFAULT_BORDER_COLOR = window
?.getPropertyValue('--w-e-textarea-border-color')

export function parseStyleHtml(elem: DOMElement, node: Descendant, _editor: IDomEditor): Descendant {
if (elem.tagName !== 'TABLE' && elem.tagName !== 'TD') { return node }
if (!['TABLE', 'TD', 'TH'].includes(elem.tagName)) { return node }

const $elem = $(elem)

Expand Down

0 comments on commit 3f6d567

Please sign in to comment.