Skip to content

fix(editor): convert tables without <th> cells during rich paste#1286

Merged
perber merged 1 commit into
mainfrom
fix/editor-rich-paste-tables
Jul 8, 2026
Merged

fix(editor): convert tables without <th> cells during rich paste#1286
perber merged 1 commit into
mainfrom
fix/editor-rich-paste-tables

Conversation

@perber

@perber perber commented Jul 8, 2026

Copy link
Copy Markdown
Owner

turndown-plugin-gfm only recognizes a table's header row when its cells are literal elements, and otherwise keeps the whole table as raw, unconverted HTML. Many real paste sources (Google Sheets, plain web tables, Excel-to-HTML) render every cell as , so their tables were silently dropped as raw HTML instead of becoming markdown.

Also wires rich paste behind Ctrl/Cmd+Shift+V instead of plain paste while it's being tested, and moves pasteRich/pastePlain out of the imperative handle into MarkdownEditor callbacks passed down to the CodeMirror keymap.

turndown-plugin-gfm only recognizes a table's header row when its cells
are literal <th> elements, and otherwise keeps the whole table as raw,
unconverted HTML. Many real paste sources (Google Sheets, plain web
tables, Excel-to-HTML) render every cell as <td>, so their tables were
silently dropped as raw HTML instead of becoming markdown.

Also wires rich paste behind Ctrl/Cmd+Shift+V instead of plain paste
while it's being tested, and moves pasteRich/pastePlain out of the
imperative handle into MarkdownEditor callbacks passed down to the
CodeMirror keymap.
@perber
perber merged commit 9c73b54 into main Jul 8, 2026
9 checks passed
@perber
perber deleted the fix/editor-rich-paste-tables branch July 8, 2026 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant