microsoft / microsoft/terminal

FR: Customizable HTML/formated copy

Open
#2,131 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area-Settings Help Wanted Issue-Feature Product-Terminal
Dominant language
C++
Stars
105k
Forks
9.6k
Avg merge
3d 17h
Merged PRs (30d)
29

Description

Description of the new feature/enhancement

Text copied in formated form, like HTML, should be customizable by settings, so in case you do a lot of copy-paste you don't have to re-format each piece to match your preferences.
All of them should be optional, with some default values. Once settings are categorized, they should go into single category.

Proposed technical implementation details (optional)

My propositions:

Property Type Default Description
htmlWidth String "terminal" - terminal - the width of the actual terminal.
- text - up to the last printable character. Like terminal, but with stripped blank space on the right.
- infinite - Scratches to available space (current behaviour).
- Valid css value e.g. 500px
htmlBackground String background's value Could anything that background can be or any valid css value that would be passed to background css property, like url. Theoretically we could support stripping the actual background (like image) and embed it as base64. I'd like that feature, but I'm afraid it's too heavy for a while.
htmlOffsetFirstCharracter Boolean true In situation like this:
   0123456789
   ABCDEFGHIJ
   KLMNOPQRST
where this means selected, true makes the paste as:
         3456789
   ABCDEFGHIJ
   KLMNOPQ
and false as:
   3456789
   ABCDEFGHIJ
   KLMNOPQ

Other than these above, properties padding, fontFace, fontSize and colorTable should be duplicated for the html/formated text so they can be set separately. If not set, they would match the terminal's ones.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the Windows Terminal code that produces formatted or HTML clipboard copies and the existing settings definitions for terminal appearance. Compare the current behavior with the proposed htmlWidth, htmlBackground, htmlOffsetFirstCharacter, padding, fontFace, fontSize, and colorTable options, then define tests covering each optional setting and its default behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, html
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.