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

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

Received on Tuesday, 10 January 2012 20:51:22 UTC