Skip to content

Fix: Preserve markdown formatting when copying notes #4838#5317

Open
paraboys wants to merge 2 commits into
fastrepl:mainfrom
paraboys:fix-markdown-copy
Open

Fix: Preserve markdown formatting when copying notes #4838#5317
paraboys wants to merge 2 commits into
fastrepl:mainfrom
paraboys:fix-markdown-copy

Conversation

@paraboys
Copy link
Copy Markdown

@paraboys paraboys commented May 24, 2026

Fixes #4838

Summary

Preserves markdown formatting when copying note content by writing both text/plain and text/markdown MIME types to the clipboard.

Changes

  • Replaced navigator.clipboard.writeText() with navigator.clipboard.write()
  • Added text/markdown clipboard MIME support alongside text/plain

Why

This allows markdown-aware tools/editors to preserve markdown formatting when pasting copied note content.


Note

Low Risk
Small UX change to local clipboard writes in the note header; no auth, data, or server impact.

Overview
Note tab Copy (memos and enhanced summaries) now writes both text/plain and text/markdown via navigator.clipboard.write() so markdown-aware paste targets keep formatting.

If the clipboard API rejects the text/markdown item, copy falls back to navigator.clipboard.writeText() so copy still works in environments that only support plain text.

Reviewed by Cursor Bugbot for commit ccdb791. Bugbot is set up for automated code reviews on this repo. Configure here.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 24, 2026

👷 Deploy request for old-char pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit ccdb791

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit a7c9901. Configure here.

Comment thread apps/desktop/src/session/components/note-input/header.tsx Outdated
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.

Copying from note editor and pasting to other tools should preserve markdown format

1 participant