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

[whatwg] Handling of collapsed whitespace in contenteditable

From: Smylers <Smylers@stripey.com>
Date: Mon, 20 Jun 2011 22:47:29 +0100
Message-ID: <20110620214729.GE16018@stripey.com>
Aryeh Gregor writes:

> The behavior we really want here is to output regular spaces, and use
> white-space: pre-wrap.
> 
> Does anyone have any suggestions on how best to handle this?  It seems
> like no matter what we do, the best advice to authors would be to set
> white-space: pre-wrap on the editable region and the resulting
> editable content.

Can you detect when an author has set white-space: pre-wrap, and specify
that browsers have the sane behaviour in that case?

You'd still have to specify the awkward, fragile behaviour for when it
isn't set, but it at least means that going forwards authors could opt
in to the sane behaviour. And any author who complains about the
&nbsp;-s not being quite as they wanted could be pointed at the pre-wrap
alternative.

Smylers
-- 
http://twitter.com/Smylers2
Received on Monday, 20 June 2011 14:47:29 UTC

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