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

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

From: Ryosuke Niwa <rniwa@webkit.org>
Date: Wed, 11 Jan 2012 09:31:26 -0800
Message-ID: <CABNRm62J1c6DTdJpPS_LhyTjQJFJm6uDr2cDDZkUqJ3HUFvMNA@mail.gmail.com>
To: Markus Ernst <derernst@gmx.ch>
Cc: Simon Pieters <simonp@opera.com>, Aryeh Gregor <ayg@aryeh.name>, Ojan Vafai <ojan@chromium.org>, Ehsan Akhgari <ehsan@mozilla.com>, "Michael A. Puls II" <shadow2531@gmail.com>, "Hallvord R. M. Steen" <hallvord@opera.com>, WebApps WG <public-webapps@w3.org>
On Wed, Jan 11, 2012 at 1:43 AM, Markus Ernst <derernst@gmx.ch> wrote:

> Am 11.01.2012 10:00 schrieb Simon Pieters:
>
>  On Tue, 10 Jan 2012 21:50:34 +0100, 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.
>>>
>>
>> This is why we implemented opera-defaultblock. Apps were manually
>> converting our output to use divs because they didn't want margins,
>> which is non-trivial to do and often leaves bugs in edge cases.
>>
>
> Actually, applying p {margin:0} looks quite trivial.


The problem is that many existing contents don't have that css rule and we
obviously don't want to create markup like <p style="margin: 0px;"> for it
is too verbose.

On the long term, from a developer's and client supporter's POV I'd prefer
> to have a standard behavior that works the same in all UAs, and all common
> editor applications, by default. Offering a default paragraph separator
> setting means, that editor behaviors will remain different across
> applications, which is confusing for many users.
>

That's just not gonna happen. Each application uses a different paragraph
separator for a reason.

It might be less a hassle to have maintainers of existing applications
> insert a line of code that triggers legacy behavior, if this is crucial for
> their application.
>

That doesn't solve any backward compatibility problems.

- Ryosuke
Received on Wednesday, 11 January 2012 17:32:17 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:49 GMT