Repository navigation
[stable35] fix(table): paste copied table cells into target cells - #9409
Merged
Merged
Conversation
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
backportbot
Bot
requested review from
max-nextcloud,
mejo- and
silverkszlo
as code owners
October 16, 2026 17:31
mejo-
approved these changes
Oct 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of PR #9405