W3C home > Mailing lists > Public > whatwg@whatwg.org > May 2011

[whatwg] Pressing Enter in contenteditable: <p> or <br> or <div>?

From: Ryosuke Niwa <rniwa@webkit.org>
Date: Fri, 13 May 2011 15:57:35 -0700
Message-ID: <BANLkTim5RvVHwij8X2zmc2PkqzqO3JexXw@mail.gmail.com>
On Fri, May 13, 2011 at 3:35 PM, Ehsan Akhgari <ehsan at mozilla.com> wrote:

> On 11-05-13 1:48 PM, Ryosuke Niwa wrote:
>
>> On Fri, May 13, 2011 at 10:26 AM, Aryeh Gregor<Simetrical+w3c at gmail.com
>> >wrote:
>> Note that br and div affect UBA differently so we must consider what
>> bidirectional text users want as well.
>>
>> For example, if we had<div dir="rtl">hello</div>, and inserted br as in
>> <div dir="rtl">hello<br></div>, then we preserve the RTL directionality.
>>  If
>> we insert div on the other hand,<div dir="rtl">hello</div><div></div>,
>> then
>> new paragraph will have the containing block's direction.
>>
>> This will be a tricky issue when people want to mix LTR/RTL paragraphs in
>> the same editable region.
>>
>
> This is a very good point.  I know that <p> constitutes a UBA paragraph.
>  Does the same apply to <div> as well?


Yes.  Any block element will do.

- Ryosuke
Received on Friday, 13 May 2011 15:57:35 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:06 UTC