Bug 12198 - execcommand italic and bold commands should generate <i> and <b>
Summary: execcommand italic and bold commands should generate <i> and <b>
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 420+
Hardware: PC OS X 10.4
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-10 08:31 PST by Anne van Kesteren
Modified: 2007-04-25 12:37 PDT (History)
1 user (show)

See Also:


Attachments
test case (211 bytes, text/html)
2007-04-25 06:26 PDT, Alexey Proskuryakov
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Anne van Kesteren 2007-01-10 08:31:01 PST
I heard that currently "italic" and "bold" generic something along the lines of:

  <span style="font-style:italic"> ... </span>

that's not really useful. Given that this is mostly used by WYSIWYG editors generating <em> and <strong> isn't particularly useful either (that's what IE does at the moment).
Comment 1 Dan POPA 2007-03-05 01:38:45 PST
(In reply to comment #0)
> I heard that currently "italic" and "bold" generic something along the lines
> of:
> 
>   <span style="font-style:italic"> ... </span>
> 
> that's not really useful. Given that this is mostly used by WYSIWYG editors
> generating <em> and <strong> isn't particularly useful either (that's what IE
> does at the moment).
> 
Consider implementing document.execCommand("styleWithCSS", false, bool) as in Gecko.
When bool is false, formatting commands should use tags instead of styled spans. Use B,I no STRONG,EM.
Comment 2 Dan POPA 2007-03-05 01:48:49 PST
OK, Use STRONG,EM not B,I .
Comment 3 Alexey Proskuryakov 2007-04-25 06:26:20 PDT
Created attachment 14175 [details]
test case

Anne, this seems to work as expected in a current nightly: <i><b>Test</b></i>

I do not know if this has changed, or was always so.
Comment 4 Alexey Proskuryakov 2007-04-25 12:37:05 PDT
I've also tried r18386 (from December 2006), and it also added <b> and <i>. Closing as INVALID.

Going to file a separate bug for styleWithCSS.