<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>12533</bug_id>
          
          <creation_ts>2011-04-20 12:35:25 +0000</creation_ts>
          <short_desc>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.</short_desc>
          <delta_ts>2011-11-07 20:29:05 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML WG</product>
          <component>LC1 HTML5 spec</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>13891</dup_id>
          
          <bug_file_loc>http://www.whatwg.org/specs/web-apps/current-work/#editing-apis</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>contributor</reporter>
          <assigned_to name="Aryeh Gregor">ayg</assigned_to>
          <cc>ayg</cc>
    
    <cc>brunoaiss</cc>
    
    <cc>ian</cc>
    
    <cc>mike</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
          
          <qa_contact name="HTML WG Bugzilla archive list">public-html-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>47575</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2011-04-20 12:35:25 +0000</bug_when>
    <thetext>Specification: http://www.whatwg.org/specs/web-apps/current-work/
Section: http://www.whatwg.org/specs/web-apps/current-work/#editing-apis

Comment:
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.

Posted from: 130.149.33.2
User agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0) Gecko/20100101 Firefox/4.0</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47590</commentid>
    <comment_count>1</comment_count>
    <who name="Aryeh Gregor">ayg</who>
    <bug_when>2011-04-21 19:51:58 +0000</bug_when>
    <thetext>I&apos;m currently working on speccing editing APIs, so I&apos;ll assign this bug to myself.  Such a new feature is almost certainly out of scope for HTML5, but I don&apos;t know of a better component right now, so I&apos;ll leave it as HTML5.  Maybe one day we&apos;ll get an HTML6 component.  Currently I&apos;m working on defining the existing API, but at some point I might work on speccing new features.

I&apos;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(&quot;[src=MYSRC]&quot;) (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&apos;t know if we can compatibly make execCommand() return anything, though.  Any suggestions for syntax?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>53621</commentid>
    <comment_count>2</comment_count>
    <who name="Michael[tm] Smith">mike</who>
    <bug_when>2011-08-04 05:15:47 +0000</bug_when>
    <thetext>mass-move component to LC1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59701</commentid>
    <comment_count>3</comment_count>
    <who name="Aryeh Gregor">ayg</who>
    <bug_when>2011-11-07 20:29:05 +0000</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 13891 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>