Skip to content

[stable35] fix(table): paste copied table cells into target cells - #9409

Merged
mejo- merged 5 commits into
stable35from
backport/9405/stable35
Oct 16, 2026
Merged

mejo- merged 5 commits into
stable35from
backport/9405/stable35

Conversation

@backportbot

@backportbot backportbot Bot commented Oct 16, 2026

Copy link
Copy Markdown

Backport of PR #9405

mejo- added 5 commits October 16, 2026 17:31
Pasting copied table cells into a table cell was refused with a
"nested tables are not supported" warning.

Cells and rows copied from a ProseMirror editor (marked with
data-pm-slice) now keep their type when parsed. Pasted header cells and
rows are converted to body ones. A single copied cell is unwrapped and
its content pasted at the cursor. Several cells are handed to the
prosemirror-tables paste handler, which writes them into the target
cells from the cursor onwards and adds rows and columns as needed.
Tables pasted from spreadsheet apps go the same way, instead of keeping
only the first cell's content.

Pasting a table together with other content is still rejected as a
nested table.

Signed-off-by: Jonas <jonas@freesources.org>
Assisted-by: ClaudeCode:claude-opus-5-5
Text copied from inside a table cell is pasted wrapped in the table, row
and cell it was copied from. The cell paste handling did not detect any
cells in it and rejected it as a nested table. Unwrap the content and
paste it at the cursor instead.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Jonas <jonas@freesources.org>
A single copied cell was pasted with its content opened as deep as
possible. Text after the cursor was pulled into a list at the end of the
cell, and a list at the start of the cell was merged into the paragraph
at the cursor. Only merge with the text at the cursor where the cell
content starts or ends with a paragraph.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Jonas <jonas@freesources.org>
Use the wide prop of NcButton instead, which disables the forced width.

Signed-off-by: Jonas <jonas@freesources.org>
Assisted-by: ClaudeCode:claude-opus-5-5
The "Add row below" and "Add column after" buttons put the cursor at a
position that has no inline content: in the new row's first cell before
its paragraph, or in the header row before the new header cell.

Typing there made ProseMirror wrap the text in a new node. A new body
cell ended up with an extra empty paragraph below the typed text, and a
new header row got an extra header cell.

Move the cursor into the new cell's inline content instead.

Signed-off-by: Jonas <jonas@freesources.org>
Assisted-by: ClaudeCode:claude-opus-5-5
@mejo-
mejo- enabled auto-merge October 16, 2026 17:34
@mejo-
mejo- merged commit fab38a1 into stable35 Oct 16, 2026
64 checks passed
@mejo-
mejo- deleted the backport/9405/stable35 branch October 16, 2026 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant