You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Issue with Copying Preview-State Table Strings in Markdown #5698
When copying a table string in preview state, the pasted Markdown table content appears as '[table]'. However, the table string can be copied normally via the right-click operation.
Steps to reproduce
Open the target document containing a table and switch to preview mode (where the table is rendered visually rather than displayed as raw Markdown code).
Use the mouse to select the entire content of the table in preview state.
Press the system’s default copy shortcut (e.g., Ctrl+C on Windows/Linux, Cmd+C on macOS) to copy the selected table string.
Paste the copied content into a text editor or Markdown-compatible field (e.g., a new document, comment box).
Observe that the pasted content displays as [table] instead of the actual table string.
Return to the preview-state table, right-click on the selected table content, and choose the "Copy" option from the context menu.
Paste the content again—verify that the actual table string is copied correctly.
I traced this and the [table] symptom is already fixed on main — the fix just wasn't in the 1.15.0 build you were running.
Root cause. In preview mode, Cmd/Ctrl+C copies through ProseMirror's clipboard serializer, which delegates to tiptap-markdown@0.9.0. Its built-in table serializer checks isMarkdownSerializable(node) and, when the copied selection isn't a clean header + body GFM table (e.g. selecting the whole table or only body cells), bails to its raw-HTML fallback. With raw HTML disabled it writes the literal string [table] to the clipboard. That's why:
Cmd/Ctrl+C produced [table] — it uses the markdown serializer.
right-click → Copy worked — that path copies the visible DOM text via window.getSelection().toString(), not the markdown serializer.
Fix (already in the codebase).apps/desktop/src/renderer/components/MarkdownRenderer/components/TipTapMarkdownRenderer/ now registers a custom serializeMarkdownTable on the table node's storage.markdown.serialize (createMarkdownExtensions.ts), replacing the [table] fallback with a real GFM table and synthesizing an empty header row for headerless/partial selections. A TableClipboardMarkdown plugin routes each copied selection appropriately (whole-table selection → GFM table, in-cell/partial selection → plain text). This is covered by serializeMarkdownTable.test.ts (14 passing tests), including one that explicitly reproduces this report.
So this should be resolved in the next release after 1.15.0. If you still see [table] on a build newer than that, please reopen with the exact version and I'll dig into the specific selection type.
Activity
github-actions commentedon Jul 15, 2026
Triage findings
I traced this and the
[table]symptom is already fixed onmain— the fix just wasn't in the1.15.0build you were running.Root cause. In preview mode,
Cmd/Ctrl+Ccopies through ProseMirror's clipboard serializer, which delegates totiptap-markdown@0.9.0. Its built-intableserializer checksisMarkdownSerializable(node)and, when the copied selection isn't a cleanheader + bodyGFM table (e.g. selecting the whole table or only body cells), bails to its raw-HTML fallback. With raw HTML disabled it writes the literal string[table]to the clipboard. That's why:Cmd/Ctrl+Cproduced[table]— it uses the markdown serializer.window.getSelection().toString(), not the markdown serializer.Fix (already in the codebase).
apps/desktop/src/renderer/components/MarkdownRenderer/components/TipTapMarkdownRenderer/now registers a customserializeMarkdownTableon the table node'sstorage.markdown.serialize(createMarkdownExtensions.ts), replacing the[table]fallback with a real GFM table and synthesizing an empty header row for headerless/partial selections. ATableClipboardMarkdownplugin routes each copied selection appropriately (whole-table selection → GFM table, in-cell/partial selection → plain text). This is covered byserializeMarkdownTable.test.ts(14 passing tests), including one that explicitly reproduces this report.So this should be resolved in the next release after
1.15.0. If you still see[table]on a build newer than that, please reopen with the exact version and I'll dig into the specific selection type.Kitenite commentedon Jul 15, 2026
Hey this was recently fixed will be in next release :)