Copy as Rich Text from Markdown Preview #56447
aahlijia
started this conversation in
Feature Requests
Replies: 1 comment
-
|
This is a feature I used a lot in VSCode and it would be great to have in Zed. Many things support Markdown these days but a lot of "enterprise" apps and documentation systems don't so being able to copy and paste rich text from the Markdown preview saves a conversation step when using Zed to write docs for those systems. PR: #56452 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Body
Purpose: When copying a selection from the Markdown Preview, write both plain text and HTML to the system clipboard. Paste targets that understand rich text (Notion, Google Docs, Apple Notes, email clients) will receive formatted output; plain-text targets (Terminal, Notepad,
vim) are unaffected.Background:
This is standard behavior in browsers and document editors. Copying from a rendered view and pasting into a rich-text target should preserve the visual formatting. Currently, Zed strips all formatting on copy, which forces users to manually reformat headings, bold text, and lists after pasting.
Prior art:
Implementation approach:
ClipboardEntry::Html(String)to GPUI's clipboard abstraction (one new enum variant + one helper method onClipboardItem).pulldown_cmark, which is already a workspace dependency.public.html), Linux X11 (text/htmlatom), Linux Wayland (text/htmlMIME type), and Windows (HTML Formatwith CF_HTML header).Platform support: macOS, Linux (X11 + Wayland), Windows, all three implemented.
What else this affects:
Beta Was this translation helpful? Give feedback.
All reactions