vercel / hyper

A terminal built on web technologies

Home Page:https://hyper.is

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Copy with formatting

jaraco opened this issue · comments

I recently wanted to share some output from a nice text-based UI that uses color, but found that copying the text from Hyper.js to the clipboard retained only the text and discarded the formatting. I asked around and found that other terminals, such as iTerm2, support a (hidden) feature to copy the text with formatting (e.g. Cmd+Opt+C on Mac) and when pasting that text into a google doc, it renders the text with formatting:

image

I'd like to be able to do the same with Hyper.js.

Describe the solution you'd like

Implement support for copy with formatting, extracting the formatting into HTML and storing that information on the clipboard as HTML.

Describe alternatives you've considered

I could switch to another terminal, but I'd like to continue to use Hyper.js for its portability and extensibility.