- From: Aryeh Gregor <Simetrical+w3c@gmail.com>
- Date: Thu, 7 Apr 2011 18:35:42 -0400
On Thu, Apr 7, 2011 at 6:03 PM, Boris Zbarsky <bzbarsky at mit.edu> wrote: >> So browsers must be special-casing how execCommand() affects >> selections somehow > > That's certainly what Gecko is doing, yes. Thanks for the info. In the end, I managed to define a reasonably clean way of getting good enough results: http://aryeh.name/gitweb.cgi?p=editcommands;a=blob_plain;f=editcommands.html;hb=d2481d02#preserving-ranges There are some cases where its behavior is slightly unexpected, in terms of putting the ends of the selection inside vs. outside elements, but it's good enough for now.
Received on Thursday, 7 April 2011 15:35:42 UTC