W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2012

Re: Pressing Enter in contenteditable: <p> or <br> or <div>?

From: Charles Pritchard <chuck@jumis.com>
Date: Tue, 10 Jan 2012 13:54:40 -0800
Message-Id: <628297D8-064A-47C0-B29D-9A9E4910B1A9@jumis.com>
Cc: Aryeh Gregor <ayg@aryeh.name>, Ojan Vafai <ojan@chromium.org>, Ehsan Akhgari <ehsan@mozilla.com>, Simon Pieters <simonp@opera.com>, "Michael A. Puls II" <shadow2531@gmail.com>, Markus Ernst <derernst@gmx.ch>, "Hallvord R. M. Steen" <hallvord@opera.com>, WebApps WG <public-webapps@w3.org>
To: Ryosuke Niwa <rniwa@webkit.org>
On Jan 10, 2012, at 12:50 PM, Ryosuke Niwa <rniwa@webkit.org> wrote:

> On Tue, Jan 10, 2012 at 12:46 PM, Aryeh Gregor <ayg@aryeh.name> wrote:
> On Tue, Jan 10, 2012 at 3:40 PM, Ryosuke Niwa <rniwa@webkit.org> wrote:
> > Single br tag is shorter than pairs of div tags when serialized.
> True, but only slightly, and the difference is even smaller if you use
> <p> instead of <div>.  This isn't enough of a reason by itself to
> justify the extra complexity of another mode.  Are there other
> reasons?
> p has default margins. That alone is enough for us not to adopt p as the default paragraph separator. Also, unfortunately, there are many legacy contents that rely on the fact webkit uses div as the paragraph separator so we need a global or per editing-host switch regardless.
> I almost want a global switch to toggle between legacy UA-specific behavior and new spec-compliant behavior.
> - Ryosuke

I've got a similar issue with copy/paste of HTML. If a switch were around for contentEditable, I might route through it on copy events in the page to tidy up some of the raw HTML clipboard.

Received on Tuesday, 10 January 2012 22:01:49 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:30 UTC