Skip to content

feat: initial support for multi-column; lists and media fixes(Copy/paste project) #2528

Merged
caio-pizzol merged 7 commits intomainfrom
sd-148_copy-paste-superdoc
Mar 30, 2026
Merged

feat: initial support for multi-column; lists and media fixes(Copy/paste project) #2528
caio-pizzol merged 7 commits intomainfrom
sd-148_copy-paste-superdoc

Conversation

@VladaHarbour
Copy link
Copy Markdown
Contributor

This PR introduces fixes to support copy/paste experience within Superdoc:

  1. Preserves multi-column layout
  2. Preserves lists (including nested)
  3. Preserves images and headings

(We have hyperlinks and table support in current stable version)

@linear
Copy link
Copy Markdown

linear Bot commented Mar 23, 2026

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 547bdff47c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/super-editor/src/core/helpers/superdocClipboardSlice.js Outdated
Comment thread packages/super-editor/src/core/InputRule.js Outdated
Comment thread packages/super-editor/src/core/commands/toggleList.js Outdated
@VladaHarbour VladaHarbour changed the title feat: initial support for multi-column; lists and media fixes feat: initial support for multi-column; lists and media fixes(Copy/paste project) Mar 23, 2026
@VladaHarbour VladaHarbour force-pushed the sd-148_copy-paste-superdoc branch from 3e811a3 to 499b262 Compare March 25, 2026 10:27
Copy link
Copy Markdown
Contributor

@caio-pizzol caio-pizzol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@VladaHarbour nice work, Codex bot comments from earlier are all handled.

  • handleCutEvent: preventDefault before the try block means Cmd+X silently fails if anything throws — see inline fix
  • stripWordListConditionalPrefixes: missing [endif] eats all content after it — see inline warning
  • createListIdAllocator is copy-pasted between two files, bodySectPr helpers are duplicated — see inline suggestions
  • missing round-trip tests for embedSliceInHtml/extractSliceFromHtml/stripSliceFromHtml and shouldPreserveSlicePastedListRendering
  • no Playwright tests for copy-paste yet — fine as follow-up

Comment thread packages/super-editor/src/editors/v1/core/InputRule.js
Comment thread packages/super-editor/src/core/InputRule.js Outdated
Comment thread packages/super-editor/src/core/InputRule.js Outdated
Comment thread packages/super-editor/src/editors/v1/core/InputRule.js
Comment thread packages/super-editor/src/core/inputRules/html/html-helpers.js Outdated
@VladaHarbour VladaHarbour force-pushed the sd-148_copy-paste-superdoc branch from a5d7065 to d410051 Compare March 27, 2026 15:24
@caio-pizzol caio-pizzol force-pushed the sd-148_copy-paste-superdoc branch from 1016d54 to 35d3a45 Compare March 30, 2026 15:15
VladaHarbour and others added 5 commits March 30, 2026 18:15
- Copy-paste preserves inline formatting (bold)
- Copy-paste preserves list structure
- Cut removes content, paste restores it
- Pasted block identities are stripped (no duplicate paraId/sdBlockId)
- Copy-paste preserves images from multi-format document (PNG, JPG, BMP, GIF, TIFF)
- Image path collision triggers rename to avoid overwriting existing media
@VladaHarbour VladaHarbour force-pushed the sd-148_copy-paste-superdoc branch from 35d3a45 to d01a3c3 Compare March 30, 2026 15:16
caio-pizzol and others added 2 commits March 30, 2026 13:03
… paste guard (SD-148)

- embedSliceInHtml/extractSliceFromHtml/stripSliceFromHtml round-trip
- Unicode content round-trip (CJK, emoji)
- bodySectPr embed + extract round-trip
- extractSliceFromHtml returns null for plain HTML
- bodySectPrShouldEmbed with multi/single column
- shouldPreserveSlicePastedListRendering preserves freshly pasted list data
- non-slice paragraphs still get recalculated
Copy link
Copy Markdown
Contributor

@caio-pizzol caio-pizzol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@VladaHarbour round 1 feedback is all addressed, looks good.

we pushed some tests:

  • copy-paste round-trip tests (formatting, lists, cut, images, path collisions) — passing on all browsers
  • unit tests for the HTML embed/extract functions and the list rendering paste guard

one thing: spacing between images and headings gets tighter after paste. probably out of scope here but worth a follow-up.

approving.

@caio-pizzol caio-pizzol enabled auto-merge (squash) March 30, 2026 16:12
@caio-pizzol caio-pizzol merged commit faaedb6 into main Mar 30, 2026
36 of 39 checks passed
@caio-pizzol caio-pizzol deleted the sd-148_copy-paste-superdoc branch March 30, 2026 16:13
@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented Mar 30, 2026

🎉 This PR is included in vscode-ext v1.1.0-next.42

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented Mar 30, 2026

🎉 This PR is included in superdoc v1.24.0-next.41

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented Mar 30, 2026

🎉 This PR is included in superdoc-cli v0.5.0-next.41

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented Mar 30, 2026

🎉 This PR is included in superdoc-sdk v1.3.0-next.41

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented Mar 30, 2026

🎉 This PR is included in esign v2.2.0-next.3

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented Mar 30, 2026

🎉 This PR is included in template-builder v1.3.0-next.2

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented Mar 30, 2026

🎉 This PR is included in superdoc v1.24.0

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented Mar 30, 2026

🎉 This PR is included in superdoc-cli v0.5.0

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented Apr 2, 2026

🎉 This PR is included in superdoc-sdk v1.3.0

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented Apr 2, 2026

🎉 This PR is included in vscode-ext v2.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants