Feature Request: HTML Copy #1523

Closed
opened 2026-01-30 22:29:32 +00:00 by claunia · 3 comments
Owner

Originally created by @carlos-zamora on GitHub (Jun 5, 2019).

Originally assigned to: @carlos-zamora on GitHub.

Summary of the new feature/enhancement

Copy RTF data from selection. Useful for pasting text over to MS Word (or something similar).
Copy HTML data from selection.

Resources:

Proposed technical implementation details

So, looking at Clipboard.cpp under ConHost's InteractivityWin32 project, should cover most of what is done. We're just slightly different in that we're using the UWP Clipboard API but that should actually make a lot of it much easier.

The data should already be saved in data in Terminal::RetrieveSelectedTextFromBuffer(bool). We just need to actually save it properly.

Originally created by @carlos-zamora on GitHub (Jun 5, 2019). Originally assigned to: @carlos-zamora on GitHub. # Summary of the new feature/enhancement Copy RTF data from selection. Useful for pasting text over to MS Word (or something similar). Copy HTML data from selection. Resources: - [Copy and Paste Docs](https://docs.microsoft.com/en-us/windows/uwp/app-to-app/copy-and-paste) - [DataPackage Docs](https://docs.microsoft.com/en-us/uwp/api/Windows.ApplicationModel.DataTransfer.DataPackage) (how to actually save the stuff. This is probably the more important doc) # Proposed technical implementation details So, looking at `Clipboard.cpp` under ConHost's InteractivityWin32 project, should cover most of what is done. We're just slightly different in that we're using the UWP Clipboard API but that should actually make a lot of it much easier. The data should already be saved in `data` in `Terminal::RetrieveSelectedTextFromBuffer(bool)`. We just need to actually save it properly.
claunia added the Issue-FeatureIn-PRNeeds-Tag-FixArea-InteractionProduct-Terminal labels 2026-01-30 22:29:32 +00:00
Author
Owner

@0xabu commented on GitHub (Jun 11, 2019):

I just came here to note that HTML copy is useful for "modern" apps like the inbox Mail and OneNote apps that support pasting HTML but not RTF.

@0xabu commented on GitHub (Jun 11, 2019): I just came here to note that HTML copy is useful for "modern" apps like the inbox Mail and OneNote apps that support pasting HTML but not RTF.
Author
Owner

@RichardSlater commented on GitHub (Jun 26, 2019):

HTML and RTF would be invaluable to quickly producing examples, my current workflow involves pasting it into a text editor and using syntax highlighting and extensions to copy it back out again.

@RichardSlater commented on GitHub (Jun 26, 2019): HTML and RTF would be invaluable to quickly producing examples, my current workflow involves pasting it into a text editor and using syntax highlighting and extensions to copy it back out again.
Author
Owner

@carlos-zamora commented on GitHub (Aug 20, 2019):

Splitting off RTF copy to another issue. This issue now just focuses on HTML Copy and can now be closed.

@carlos-zamora commented on GitHub (Aug 20, 2019): Splitting off RTF copy to another issue. This issue now just focuses on HTML Copy and can now be closed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#1523