[Webkit-unassigned] [Bug 16555] New: execCommand doesn't work properly
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Dec 21 04:57:25 PST 2007
http://bugs.webkit.org/show_bug.cgi?id=16555
Summary: execCommand doesn't work properly
Product: WebKit
Version: 525+ (Nightly build)
Platform: Macintosh
OS/Version: Mac OS X 10.5
Status: UNCONFIRMED
Severity: Critical
Priority: P2
Component: HTML Editing
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: danny.bloemendaal at informaat.nl
>From within a console with body in editmode and the cursor in line 2:
=================================
doc.getDocument().body.innerHTML
<p>line 1</p>
<p>line 2</p>
<p>line 3</p>
<p> </p>
doc.document.execCommand("formatBlock", false, "h3")
1
doc.getDocument().body.innerHTML
<p>line 1</p>
<h3><span class="Apple-style-span" style="font-size: 12px; font-weight: normal;
line-height: 18px; ">l</span>ine 2</h3>
<p>line 3</p>
<p> </p>
======================
The result is the same if you select line 2.
It gets worse. if I follow it up with another formatBlock, this time for "p"
then it inserts not just more span tags but a gratuitous <font
class="Apply-style-span" size="3">. font?? font??? ouch!
Bottom line is that it should just insert this:
<h3>line 2</h3>
Trying it with a div, just as bad:
====================
doc.getDocument().body.innerHTML
<p>line 1</p>
<p>line 2</p>
<p>line 3</p>
<p> </p>
doc.document.execCommand("formatBlock", false, "div")
1
doc.getDocument().body.innerHTML
<p>line 1</p>
<div><span class="Apple-style-span" style="line-height: 18px; ">l</span>ine
2</div>
<p>line 3</p>
<p> </p>
================================
/me investigates more
--
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list