User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7 Attempting to apply a background color to a block of text in an HTML compose window applies the color to the page background instead. HTML source code does not appear to be modified by the background-color selection. Reproducible: Always Steps to Reproduce: 1. Select text (in HTML compose window) 2. Click on "choose color for background" icon in HTML attributes task bar next to font selection. 3. Select a color 4. Click "OK" to apply color. Actual Results: Color gets applied to page background and not to text selected. There doesn't seem to be a workaround or any other way to highlight text with background color in HTML mail.
The desired behavior is not implemented. One primary reason for this is that mail compose does not make use of CSS; background coloration only applies to the body in mail compose. Note that using NVu, which has more advanced HTML editing, it is possible to use the toolbar to set the background color for the block-level tag (e.g. <p> or <div>) containing the selection, but not for only the selected text itself, nor for an inline tag (<span> or <b>) containing it. The workaround is to select the text you wish to highlight, then from the menu pick Insert | HTML. A window will appear with the selected text (and any tags) shown in an edit buffer. At the beginning of this buffer, add: <span style="background-color: yellow;"> (or whatever color you wish) and at the end of the buffer, add </span>
Severity: normal → enhancement
Status: UNCONFIRMED → NEW
Component: Message Compose Window → MailNews: Composition
Ever confirmed: true
OS: Windows 2000 → All
Product: Thunderbird → Core
Hardware: PC → All
Summary: Applying background color to a block of text in an HTML compose window applies to page background instead. → Means to apply background color (highlight) to a selection in an HTML composition
Version: unspecified → Trunk
I've been using Thunderbird for a while now and hadn't noticed this issue because I don't use HTML mail at all. One of my engineering colleagues at work is trying out Thunderbird in the hope of dumping Outlook. He noticed this and asked me (webmaster) if it looks broken to me or not. After testing I concluded "yes." He's not an HTML-savvy guy, just someone trying to do his email the way he always does. I'm guessing that Outlook must have a similar function to this for him to have attempted to use Thunderbird this way. The UI gives the impression that background color applied to a block of text should work. Perhaps something should be done to the UI so that users don't develop a false expectation and then conclude that Thunderbird is broken. Possible suggestions that perhaps you can improve on: 1. Currently, hovering over the background-color icon in HTML attributes task bar gives a tooltip that says "Choose color for background." If a text selection has been made the by user, s/he would expect this action to operate on the selection. Perhaps tooltip should say something like "Choose background color for this message" so that user should not expect the text selection to be affected. 2. When user clicks on background-color icon in HTML attributes task bar, the color-selection pallette that opens is misleadingly entitled "Block background color." Since it doesn't affect the "block" of text selected, perhaps change it to something like "Message background color."
Product: Core → MailNews Core
Is there anything that prevent to implement in the UI the manual solution proposed in comment#1 in TB3? I test it and it works well: <span style="background-color: yellow;"> My word with yellow background </span> I received the message on gmail with the correct background.
Also, this bug should be linked to Bug 423488 - Outlook Express/Outlook parity bugs because Outlook (or Gmail, ...) has this feature. Source: http://office.microsoft.com/en-us/outlook/HA101671421033.aspx Note that Windows Live Mail doesn't have this feature (source: http://email.about.com/od/windowsmailtips/qt/et_highlight.htm ).
Last new, I found an Add-ons that do the job: Highlight Text, available here: https://addons.mozilla.org/fr/thunderbird/addon/6509 However, I think this should be solve in core, not by an Add-on.
I agree - this would be a very useful feature
I've recently switched an organization (+60 computers) from Outlook to Thunderbird and one of the few recurrent complaints afterward was the lack of text highlighter functionality. This should be considered as a low cost high reward addition for Thunderbird 3.1.
@low cost high reward addition for Thunderbird: my thoughts exactly!
Ok, so here is what I don't understand: (1) In SeaMonkey, if I open the Composer, there is a button "Choose highlight color for text" next to the fore/background color pickers which is exactly doing what's asked for here, i.e., inserting an HTML <span> element with style="background-color: rgb(255, 255, 0);" attribute (that's yellow in this case). (2) Neither Thunderbird's Mail/News HTML editor nor SeaMonkey's offer that button in the formatting toolbar, though the editor should be the same as composer. This works when using Insert > HTML and manually entering the Composer-generated code as is, and is displayed properly with View > Message Body As > Original HTML. (3) mail/components/compose/content/editorOverlay.xul has a <toolbarbutton id="HighlightColorButton" ... command="cmd_highlight"> defined, yet it doesn't show up. Thus, is the highlight button hidden for some specific reason (i.e., won't work in Mail/News as suggested in comment #1, which may no longer apply), or does it "just" need to be made available in the (non-customizable) formatting bar to expose that functionality?
Unfortunately it's not that simple. I've made the button available by adding <toolbarbutton id="HighlightColorButton"/> after "color-buttons-container" in messengercompose.xul and it indeed showed up (except for the missing toolbar button icon). The HTML code inserted was <font bgcolor="..."> however, thus apparently more needs to be updated in the mail/suite branches to follow the editor implementation changes. Anyway, this was worth a try...
(In reply to caméléon from comment #7) > Last new, I found an Add-ons that do the job: Highlight Text, available > here: https://addons.mozilla.org/fr/thunderbird/addon/6509 Hi caméléon, this add-on seems to have been removed since, no luck with https://addons.mozilla.org/thunderbird/addon/highlight-text/ Is there some replacement for this which users can be directed to instead?
@ rsx11m It can be used add-on Highlighter instead: https://addons.mozilla.org/de/thunderbird/addon/highlighter-222207/
See also: SM bug bug 489067, which if I understand bug 489067 comment 7 correctly has an intention of fixing this for SM only.
See Also: → bug 489067
Summary: Means to apply background color (highlight) to a selection in an HTML composition → Need text highlight feature to apply background color to selected text (inline css <span style="background-color:xxx">) / Page background color picker is misplaced
Some more preliminary info from Ian's in bug 489067 comment 8: The XUL code itself is forked between TB and SM but the JS code that the XUL needs to use isn't. http://mxr.mozilla.org/comm-central/search?string=EditorSelectColor&filter=[Ee]ditorSelectColor
(In reply to Thomas D. (away till 23rd Oct) from comment #22) > Some more preliminary info from Ian's in bug 489067 comment 8: > The XUL code itself is forked between TB and SM but the JS code that the XUL > needs to use isn't. It may be easier to fix for SeaMonkey given that the code in question is active already in its composer. Then, modifications in the suite/ tree can be ported to mail/ in this bug. On the other hand, if changing the JS code breaks the respective other application, and if the majority of action is going to happen in editor/ui/composer anyway, it would make sense to fix everything in the same bug (in which case the other bug can be simply closed once done).
Only 1 problem / Bug report, <https://developer.mozilla.org/en-US/docs/Mozilla/QA/Bug_writing_guidelines#Open_a_new_bug_report_for_each_issue!>! So may be we should handle the "confusing UI" problem in a separate Bug like "Bug 1062093 - Misleading arrangement of 'text color' <-> 'page background color' chips"?
Same problem in composer! And what is the difference between this one and "Bug 121210 - Implement text highlight feature to apply background color to selected text (inline css <span style="background-color:xxx">) / Page background color picker is misplaced"?
(In reply to Rainer Bielefeld from comment #26) > So may be we should handle the "confusing UI" problem in a separate Bug like > "Bug 1062093 - Misleading arrangement of 'text color' <-> 'page background > color' chips"? I think the original report here refers to just a single issue: The background colorpicker applies the change to the document <body> where the expectation is that the change is applied to the selected text only by introducing a <span> element around it (which is what the foreground colorpicker does). You still want to be able to pick a background color for the whole message, possibly by introducing another icon for the body background color and tweaking the existing ones for the selection background color. Bug 97840 alternatively suggests to keep current overlapping icons but let their behavior vary (body background if no text selected, highlight text is one is selected). (In reply to Rainer Bielefeld from comment #27) > And what is the difference between this one and "Bug 121210 - Implement text > highlight feature to apply background color to selected text (inline css > <span style="background-color:xxx">) / Page background color picker is > misplaced"? Don't see any. In fact, the title appears to be partially copy-pasted from the bug here. We may consider 3 bugs though for the individual steps: (1) this bug here to establish any backend changes; (2) UI work necessary for Thunderbird's composition window, like new buttons; similarly, SeaMonkey bug 489067 can handle any UI work for SeaMonkey's Mail/News Composition and Composer windows.
There are two surprising things: 1. TB doesn't know this very basic feature 2. Eleven years after the feature request it is still debated what the requested feature was. If it counts then I vote for this feature. It is very important in corporate environment (as well) to emphasize the point of my thoughts. As a developer, I frequently paste code snippets for the colleagues to compare them. Highlighting the difference with some background color is way much better than applying bold or red characters because less visible differences, for example comma versus semicolon, can stay hidden if the background color is the same. Please add this feature to TB. Thanks.
We have several Bus in this area (MailNews and SeaMonkey HTML Composer), some cleanup will be required. The problem also affects SeaMonkey HTML-Webpage-Composer Bug 121210 - Implement text highlight feature to apply background color to selected text (inline css <span style="background-color:xxx">) / Page background color picker is misplaced (edit) Bug 489067 - [SM] Allow inline background color for selected text in Message Compose Bug 1062093 - Misleading arrangement of 'text color' <-> 'page background color' chips
See Also: → bug 121210
The foreground/background color selector item on the toolbar should apply *ONLY* to selected text. Foreground color works correctly. Background color does not work as expected. Current (wrongful) behaviour is: - if cursor in table, change background of current cell - if cursor outside table, change background for entire page. Correct behaviour should be: - regardless of cursor position, apply only to selected text, set selected text background color (ie highlight) HTML equivalent is: <span style="color:#112233">highlighted text</span>
You need to log in before you can comment on or make changes to this bug.