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

[whatwg] Ongoing work on an editing commands (execCommand()) specification

From: Aryeh Gregor <Simetrical+w3c@gmail.com>
Date: Thu, 7 Apr 2011 18:29:44 -0400
Message-ID: <BANLkTikSbw8EpAaqowJgQbAeWd9hXOfy1w@mail.gmail.com>
On Thu, Apr 7, 2011 at 5:57 PM, Tim Down <timdown at gmail.com> wrote:
> I don't recall ever wanting to use execCommand() in non-editable
> content myself (although I wouldn't rule it out), but I've answered a
> few questions on Stack Overflow where the asker has wanted to
> highlight (i.e. change the background colour of) the current
> selection. I've suggested temporarily putting the document into
> designMode, calling execCommand() with "HiliteColor" / "BackColor" and
> turning designMode off again.

That's an interesting use-case.  On the other hand, the "execCommand()
works everywhere" behavior is less flexible, in that it's impossible
to work around it if you don't want it, unless I'm missing something.
The behavior of non-IE browsers works well for the common case, and
when you do want to style something that's not editable, you can
always briefly make it editable.  So I'm inclined to spec the non-IE
behavior.
Received on Thursday, 7 April 2011 15:29:44 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:48:03 GMT