Paste without formatting

Discussion of general topics about Mozilla Thunderbird
Post Reply
scaruffi
New Member
Posts: 1
Joined: December 23rd, 2016, 6:44 am

Paste without formatting

Post by scaruffi »

I searched the web and found only very old discussions so i'll ask here. Not sure why CTRL-V is "paste with formatting", but most of the people around me always use "paste without formatting" (Ctrl-SHIFT-V), so is there a plan to offer the option to set "paste without formatting" as the default for CTRL-V (without having to hack thunderbird code)? I personally have no idea why people would want to paste with formatting, but anyway: any plan to offer the option to make it easy for people like me and my coworkers to set CTRL-V to "paste without formatting"? Thanks.
User avatar
DanRaisch
Moderator
Posts: 127240
Joined: September 23rd, 2004, 8:57 pm
Location: Somewhere on the right coast

Re: Paste without formatting

Post by DanRaisch »

You can use an extension like "Key Config" to map Ctrl+V to "Paste without Formatting".
http://kb.mozillazine.org/Keyconfig_ext ... hunderbird
morat
Posts: 6432
Joined: February 3rd, 2009, 6:29 pm

Re: Paste without formatting

Post by morat »

1. Paste (Ctrl+V)
2. Paste Without Formatting (Ctrl+Shift+V)

The shortcut (1) works with the subject and body text areas in the compose window.
The shortcut (2) only works with the body text area.

You can combine the commands with the keyconfig extension.

Code: Select all

var HTMLInputElement = Components.interfaces.nsIDOMHTMLInputElement;
var HTMLBodyElement = Components.interfaces.nsIDOMHTMLBodyElement;
var focusedWindow = document.commandDispatcher.focusedWindow;
var activeElement = focusedWindow.document.activeElement;
if (activeElement instanceof HTMLInputElement) {
  goDoCommand("cmd_paste");
} else if (activeElement instanceof HTMLBodyElement) {
  goDoCommand("cmd_pasteNoFormatting");
}
Instructions:

1. install extension and restart

http://mozilla.dorando.at/keyconfig.xpi

2. open a compose window
3. tools > keyconfig
4. select a compose window in the drop down window list
5. add a new key
6. type a command in the /* CODE */ box, e.g. alert("test");
7. type a shortcut in the <Disabled> box, e.g. Ctrl+Shift+!
8. apply
9. close
Post Reply