[whatwg] Handling of collapsed whitespace in contenteditable

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
 -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