Skip to content

fix: copy only the selected content in the markdown editor - #4271

Merged
JammingBen merged 1 commit into
mainfrom
fix/md-editor-copy-selection
Nov 6, 2026
Merged

JammingBen merged 1 commit into
mainfrom
fix/md-editor-copy-selection

Conversation

@JammingBen

@JammingBen JammingBen commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

Description

Copying a selection in the Markdown editor put the Markdown of all surrounding blocks on the clipboard: a word in a table cell became a whole table, text in a list item got the list marker, and code got its fences. Pasting such a copied table into another cell merged it into the existing table.

  • Copying from inside a block now only copies the selected content. Inline formatting such as bold or links stays Markdown.
  • Selections across several blocks keep the structure needed to paste them back, e.g. several list items keep their list markers.
  • Copying from inside a code block copies the raw code without fences or escaping. Pasting it back into the editor outside of a code block inserts a code block again (except when pasting into several selected table cells), so no characters get lost by reading it as Markdown.

Related Issue

@JammingBen JammingBen self-assigned this Nov 4, 2026
@JammingBen
JammingBen merged commit 226a6b8 into main Nov 6, 2026
28 checks passed
@JammingBen
JammingBen deleted the fix/md-editor-copy-selection branch November 6, 2026 12:35
@openclouders openclouders mentioned this pull request Nov 6, 2026
1 task
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.

Copying in the Markdown editor includes the surrounding blocks and breaks tables on paste

2 participants