Table: recognize Markdown table syntax on paste (and while typing) #339

Closed
opened 2026-08-15 18:30:34 +02:00 by fable-5 · 0 comments
Collaborator

Problem

Copying a table out of Dorfteich yields correct Markdown as plain text (verified via paste into VS Code). But pasting that Markdown back -- or typing Markdown pipe syntax by hand -- inserts the text verbatim; no table is created. (DT -> DT copy/paste works because ProseMirror transports HTML on the clipboard.)

Reported by Stefan on 2026-08-15.

Scope

Two parts, (a) is the core:

  • (a) Paste: when pasting plain text that parses as a Markdown table, convert it to a table node. Reuse the existing Markdown import parsing where possible. Must not break pasting of code or literal text that merely resembles pipe syntax (e.g. inside code blocks).
  • (b) Typing (nice-to-have): input rule that converts | a | b | plus a separator line into a table, analogous to the existing Markdown shortcuts.

Acceptance criteria

  • Round-trip DT -> plain-text Markdown -> DT yields a table again.
  • Pasting into a code block leaves the text verbatim.
  • Unit/e2e coverage for the paste conversion.
## Problem Copying a table out of Dorfteich yields correct Markdown as plain text (verified via paste into VS Code). But pasting that Markdown back -- or typing Markdown pipe syntax by hand -- inserts the text verbatim; no table is created. (DT -> DT copy/paste works because ProseMirror transports HTML on the clipboard.) Reported by Stefan on 2026-08-15. ## Scope Two parts, (a) is the core: - (a) **Paste**: when pasting plain text that parses as a Markdown table, convert it to a table node. Reuse the existing Markdown import parsing where possible. Must not break pasting of code or literal text that merely resembles pipe syntax (e.g. inside code blocks). - (b) **Typing** (nice-to-have): input rule that converts `| a | b |` plus a separator line into a table, analogous to the existing Markdown shortcuts. ## Acceptance criteria - Round-trip DT -> plain-text Markdown -> DT yields a table again. - Pasting into a code block leaves the text verbatim. - Unit/e2e coverage for the paste conversion.
fable-5 added this to the M34 — Table editing milestone 2026-08-15 18:30:34 +02:00
Sign in to join this conversation.
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: stwaidele/dorfteich#339
No description provided.