Skip to content

fix: paste Excel/spreadsheet copies as text instead of image (#2960) - #3033

Merged
abose merged 1 commit into
mainfrom
zz
Jul 24, 2026
Merged

fix: paste Excel/spreadsheet copies as text instead of image (#2960)#3033
abose merged 1 commit into
mainfrom
zz

Conversation

@abose

@abose abose commented Jul 23, 2026

Copy link
Copy Markdown
Member

The image-paste handlers scanned the clipboard for an image file item and acted on it without checking for co-present text. Excel/Word/spreadsheet copies place BOTH a rendered bitmap and text/plain on the clipboard, so the image always won and cells pasted as an uploaded image.

Prefer text when text/plain is present; only treat a paste as an image when the clipboard is image-only (screenshots, copy-image, Finder file copies have no text/plain). Fixes the CodeMirror markdown editor and the mdviewer live-preview paste paths.

The image-paste handlers scanned the clipboard for an image file item and
acted on it without checking for co-present text. Excel/Word/spreadsheet
copies place BOTH a rendered bitmap and text/plain on the clipboard, so the
image always won and cells pasted as an uploaded image.

Prefer text when text/plain is present; only treat a paste as an image when
the clipboard is image-only (screenshots, copy-image, Finder file copies have
no text/plain). Fixes the CodeMirror markdown editor and the mdviewer
live-preview paste paths.
@sonarqubecloud

Copy link
Copy Markdown

@abose
abose merged commit f5ef92b into main Jul 24, 2026
12 of 21 checks passed
@abose
abose deleted the zz branch July 24, 2026 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant