-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: Add a setting that disables HTML copy #2690
Comments
As an aside, what application is serving as the destination that doesn't support "Paste [as] Plain Text"? |
The last place I pasted before leaving work today was the web version of outlook, which actually does have the option to paste as plain text - but it's in a context menu that has to be clicked and has no keyboard shortcut. I have a tendency to copy something out of the terminal, start typing an email, and then press Ctrl+V, only to find that I've pasted colored text with a dark background into my email. Like I said in the original post, it's a small delay; it's just a new delay that wasn't there before the last update, in exchange for a feature I wasn't really looking for and typically don't want to use. |
When copying text to the clipboard, Terminal copies both the plaintext, and HTML text. Applications that can handle pasting rich-text generally allow you to paste content "keeping source formatting", "keeping target formatting", or "pasting plain text". These options are usually available via the context menu (Mouse: right-click. Keyboard: right-context-menu-key / SHIFT+F10) and is a well understood, and well supported behavior by most rich-text apps/tools. |
@bitcrazed Thanks, but as I mentioned above, the place I'm mostly running into this does support these options via a context menu after I paste. In the web version of outlook, right clicking and using the keyboard shortcuts mentioned just bring up my browser's context menu, which only includes "paste". |
@amazingant After copying Terminal contents to the clipboard, when I hit the context-menu key / SHIFT+F10 in Outlook online, I see a context menu that offers me both This MAY be because I am running a preview release of Outlook online, and if so, its likely this will be publicly released before long. |
Nope; that's Chrome's default context menu, I use Firefox. :) |
Then this would be a great bug to file on the Firefox team. It is 2019 and the Clipboard's ability to contain content in multiple formats has been there for at least 20 years. |
Adds array support for the existing `copyFormatting` global setting. This allows users to define which formats they would specifically like to be copied. A boolean value is still accepted and is translated to the following: - `false` --> `"none"` or `[]` - `true` --> `"all"` or `["html", "rtf"]` This also adds `copyFormatting` as a keybinding arg for `copy`. As with the global setting, a boolean value and array value is accepted. CopyFormat is a WinRT enum where each accepted format is a flag. Currently accepted formats include `html`, and `rtf`. A boolean value is accepted and converted. `true` is a conjunction of all the formats. `false` only includes plain text. For the global setting, `null` is not accepted. We already have a default value from before so no worries there. For the keybinding arg, `null` (the default value) means that we just do what the global arg says to do. Overall, the `copyFormatting` keybinding arg is an override of the global setting **when using that keybinding**. References #5212 - Spec for formatted copying References #2690 - disable html copy Validated behavior with every combination of values below: - `copyFormatting` global: { `true`, `false`, `[]`, `["html"]` } - `copyFormatting` copy arg: { `null`, `true`, `false`, `[]`, `[, "html"]`} Closes #4191 Closes #5262
Description of the new feature/enhancement
The new HTML copy feature introduced in
v0.4.2382.0
may not always be desirable, and removing the formatting typically means either opening a text editor like Notepad, pasting the text, and then copying it again, or asking the receiving application to strip formatting. When text is copied out of the terminal on a regular basis, this small delays can add up a bit, and suck up time in someone's day. For cases where a user knows this is going to happen to them frequently, it would be helpful if there were a setting that could disable the HTML copy feature.If entirely disabling HTML copy is undesirable, under the assumption that users may still want to keep formatting sometimes, another possible option would be to provide separate key bindings that behave the "old" way. However, admittedly with no experience with the codebase, this seems like it would be more work.
The text was updated successfully, but these errors were encountered: