From 4eca3123226d865b7839898b879395f2f3edfaeb Mon Sep 17 00:00:00 2001 From: fantasticit Date: Sun, 9 Apr 2023 12:15:56 +0800 Subject: [PATCH] close #231 --- .../markdown-to-prosemirror/html-to-prosemirror/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/client/src/tiptap/markdown/markdown-to-prosemirror/html-to-prosemirror/index.ts b/packages/client/src/tiptap/markdown/markdown-to-prosemirror/html-to-prosemirror/index.ts index 60c840d2..e774bbd1 100644 --- a/packages/client/src/tiptap/markdown/markdown-to-prosemirror/html-to-prosemirror/index.ts +++ b/packages/client/src/tiptap/markdown/markdown-to-prosemirror/html-to-prosemirror/index.ts @@ -22,7 +22,9 @@ function fixNode(doc) { } if (node.type === 'tableRow') { - node.content = (node.content || []).filter((subNode) => subNode.type === 'tableCell'); + node.content = (node.content || []).filter( + (subNode) => subNode.type === 'tableCell' || subNode.type === 'tableHeader' + ); } if (node.type === 'tableCell') {