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

[whatwg] Handling of collapsed whitespace in contenteditable

From: Daniel Glazman <daniel.glazman@disruptive-innovations.com>
Date: Wed, 22 Jun 2011 09:47:29 +0200
Message-ID: <4E019E11.70306@disruptive-innovations.com>
Le 21/06/11 00:00, Aryeh Gregor a ?crit :

> On Mon, Jun 20, 2011 at 5:32 PM, Ehsan Akhgari<ehsan at mozilla.com>  wrote:
>> There's a very good reason why existing browser engines have to resort to
>> &nbsp; hacks.  It's the only practical way to make sure that "foo__bar"
>> (s/_/ /) entered into an editable element would appear the intended way when
>> the innerHTML of the editable area is submitted to a server and later
>> displayed in another documents.
> Is that really such a problem?  At worst, there will be annoying
> mismatches between the same content when it's editable and not
> editable.

Yes it is. At least for HTML-based email and forms used to composer
emails. Also for blog entries composed directly in HTML through an
in-page wysiwyg editor.

Forcing 'white-space: pre-wrap' on the editor would require to force
it too on the final rendering element...

Received on Wednesday, 22 June 2011 00:47:29 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:34 UTC