W3C home > Mailing lists > Public > public-html-bugzilla@w3.org > April 2011

[Bug 12533] Being able to control what the user agent is creating on a command would be useful. Otherwise I have to listen to DOM mutation events or parse my editable text to find out.

From: <bugzilla@jessica.w3.org>
Date: Thu, 21 Apr 2011 19:52:00 +0000
To: public-html-bugzilla@w3.org
Message-Id: <E1QCzuy-0001L0-4I@jessica.w3.org>
http://www.w3.org/Bugs/Public/show_bug.cgi?id=12533

Aryeh Gregor <Simetrical+w3cbug@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ian@hixie.ch,
                   |                            |Simetrical+w3cbug@gmail.com
         AssignedTo|ian@hixie.ch                |Simetrical+w3cbug@gmail.com

--- Comment #1 from Aryeh Gregor <Simetrical+w3cbug@gmail.com> 2011-04-21 19:51:58 UTC ---
I'm currently working on speccing editing APIs, so I'll assign this bug to
myself.  Such a new feature is almost certainly out of scope for HTML5, but I
don't know of a better component right now, so I'll leave it as HTML5.  Maybe
one day we'll get an HTML6 component.  Currently I'm working on defining the
existing API, but at some point I might work on speccing new features.

I've seen this use-case in practice.  For instance, one editor I looked at
wanted to add custom attributes to images inserted using insertImage.  It did
so by adding the image, then iterating over all images in the edit window and
modifying any with the right src.

Another editor I looked at used insertImage as an insertHtml workaround for IE,
by inserting an image with an improbable src, then using the equivalent of
querySelector("[src=MYSRC]") (with shims) to find it, then removing it and
inserting the HTML in its place.


The obvious way to do this would be to allow commands to return some
command-specific value (like an HTMLImgElement for insertImage).  I don't know
if we can compatibly make execCommand() return anything, though.  Any
suggestions for syntax?

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Thursday, 21 April 2011 19:52:01 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 16:31:08 UTC