[Webkit-unassigned] [Bug 12319] New: Paste of simple rich text results in way too verbose markup

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jan 18 12:09:27 PST 2007


http://bugs.webkit.org/show_bug.cgi?id=12319

           Summary: Paste of simple rich text results in way too verbose
                    markup
           Product: WebKit
           Version: 420+ (nightly)
          Platform: Macintosh
        OS/Version: Mac OS X 10.4
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: HTML Editing
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: dwood at karelia.com


To reproduce:

0. Launch Blot_editableDiv_showSource, my modified version of "Blot" available
from <http://dan.karelia.com/webkit/Blot_editableDiv_showSource.zip> with
DYLD_FRAMEWORK_PATH pointing to TOT.  (I'm using r18941)

1. Type or paste the following text into a TextEdit document in "rich text"
mode:

this is line one
this is line two
this is line three

2. Copy that text from TextEdit
3. Click on the upper panel in the modified Blot
4. Paste

Results: contents of editable div is 

<div><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
margin-left: 0px; font: normal normal normal 12px/normal Helvetica;
font-family: Helvetica; font-size: 12px; ">this is line one</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left:
0px; font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;
font-size: 12px; ">this is line two</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left:
0px; font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;
font-size: 12px; ">this is line three</p></div>

There are so many problems with this:
* There is a plain div around the paragraphs.  This doesn't serve anything.  It
might be useful to contain styles of what is common about its contents, so that
each individual paragraph doesn't have to repeat the same formatting over and
over.
* The declarations of the font style are insane.  Just a nice shorthand "font"
property would be fine.
* The margin style is terribly verbose; it could be replaced with margin:0;

Expected:

One possibility would be:

<div style="font: 12px Helvetica;"><p style="margin:0;">this is line one</p>
<p style="margin:0;">this is line two</p>
<p style="margin:0;">this is line three</p></div>

(Apparently the paragraphs have to have their margins set for each instance)


-- 
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