[Webkit-unassigned] [Bug 127242] New: Unwanted spans inserted in contentEditable elements

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Jan 18 16:37:11 PST 2014


https://bugs.webkit.org/show_bug.cgi?id=127242

           Summary: Unwanted spans inserted in contentEditable elements
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: HTML Editing
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: azaozz at gmail.com


I'm one of the WordPress lead developers. We are by far the largest contentEditable "user" considering that WordPress powers 21% of the top 10,000,000 web sites (http://w3techs.com/technologies/overview/content_management/all). Every day hundreds of thousands web pages are created  by using WordPress' contentEditable based editor, TinyMCE.

Unfortunately we've been having more and more problems with spans with inline styles being inserted into the editor. TinyMCE has several routines to prevent these spans but it seems lately the spans are being inserted even more aggressively and in more cases.

I've made a very simple example to illustrate the problem: http://jsfiddle.net/eWsGv/6/. Note that execCommand('insertUnorderedList') and execCommand('insertOrderedList') are only wto cases where the unwanted spans appear. There are many other cases.

We've been trying to make the editor look as close to the "front-end" as possible. That generally means a lot of styles are applied in the contentEditable element. As reported by out users, it seems the more styles are there, the higher the chance that unwanted spans will be inserted.

I've tried to find out why WebKit browsers insert these spans, but couldn't. Neither of the other top browsers does anything similar. It looks like this is some sort of user-facing feature to maintain text styling, but in reality it breaks the styling. Even worse: it removes attributes from existing spans. All contentEditable editors I've seen implement some methods of removing these pesky spans.

If this indeed is considered an essential feature in contentEditable, could there be a straightforward way of turning if off, please.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list