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

[whatwg] Request for new DOM property textarea.selectionText

From: Ryosuke Niwa <rniwa@webkit.org>
Date: Fri, 27 Apr 2012 21:39:28 -0700
Message-ID: <CABNRm61CPFSX6vDzXK6oK3bXPJQDtDAXN3s5zNC+VNyR03zx8A@mail.gmail.com>
All editing commands work inside input/textarea on WebKit although some of
them have no effect (e.g. bold, italic, etc...)

I think reusing execCommand is better than adding new method for
input/textarea elements for each new feature request like this one.

- Ryosuke

On Fri, Apr 27, 2012 at 9:36 PM, Ian Hickson <ian at hixie.ch> wrote:

> On Fri, 27 Apr 2012, Ryosuke Niwa wrote:
> >
> > Why are we adding this new API? WebKit already supports
> >
> > document.execCommand('InsertText', false, "new selected text");
>
> That's for contenteditable regions, right?
>
> The new API is for <input> and <textarea>. Also, it's not limited to
> replacing the selected text, it can be any region.
>
> --
> Ian Hickson               U+1047E                )\._.,--....,'``.    fL
> http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
> Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
>
Received on Friday, 27 April 2012 21:39:28 GMT

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