W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2014

[Bug 26142] New: execCommand() should work on <textarea> and <input>.

From: <bugzilla@jessica.w3.org>
Date: Thu, 19 Jun 2014 09:43:43 +0000
To: public-webapps@w3.org
Message-ID: <bug-26142-2927@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=26142

            Bug ID: 26142
           Summary: execCommand() should work on <textarea> and <input>.
           Product: WebAppsWG
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HTML Editing APIs
          Assignee: ayg@aryeh.name
          Reporter: andyearnshaw+w3@gmail.com
        QA Contact: sideshowbarker+html-editing-api@gmail.com
                CC: mike@w3.org, public-webapps@w3.org

Currently, the editing spec defines that something is editable when the
following is true[1]:

> Something is editable if it is a node; it is not an editing host; 
> it does not have a contenteditable attribute set to the false state; 
> its parent is an editing host or editable; and either it is an HTML 
> element, or it is an svg or math element, or it is not an Element 
> and its parent is an HTML element.

I think this should be expanded to include HTML form fields that can accept
text input.  This is already the behaviour in Chrome and Internet Explorer for
some commands, though Firefox throws an error[2].

Although the majority of formatting commands might be useless, insertText, 
delete and forwardDelete could be useful for JavaScript based IMEs/virtual
keyboards, along with cut, copy, paste, undo, redo and selectAll from the
miscellaneous commands.  

There's also a use case for editors that switch between a designmode enabled
iframe for formatted editing and a text area for raw editing - these editors
would be able to reuse a lot of the same very short code (especially in the
case of "insertText") without having to slice, concat and set the element
values.

[1]: https://dvcs.w3.org/hg/editing/raw-file/tip/editing.html#editable
[2]: https://bugzilla.mozilla.org/show_bug.cgi?id=1027560

-- 
You are receiving this mail because:
You are on the CC list for the bug.
Received on Thursday, 19 June 2014 09:43:46 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:14:25 UTC