Bug 12198

Summary: execcommand italic and bold commands should generate <i> and <b>
Product: WebKit Reporter: Anne van Kesteren <annevk>
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: RESOLVED INVALID    
Severity: Normal CC: ap
Priority: P2    
Version: 420+   
Hardware: PC   
OS: OS X 10.4   
Attachments:
Description Flags
test case none

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.