[wp-trac] [WordPress Trac] #24409: Edit Image in TinyMCE editor revamp

WordPress Trac noreply at wordpress.org
Fri May 24 08:01:03 UTC 2013


#24409: Edit Image in TinyMCE editor revamp
-----------------------------+-----------------------------
 Reporter:  eablokker        |      Owner:
     Type:  feature request  |     Status:  new
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  Media            |    Version:  3.5.1
 Severity:  normal           |   Keywords:
-----------------------------+-----------------------------
 First time poster here...

 I propose a revamp of the "Edit Image" thickbox window in the TinyMCE
 editor. I believe #21390 may have intended to fix this, but didn't get
 around to it.

 I believe the edit image dialog should be in the same UI style as the new
 Insert/Upload Media dialog. We should be able to re-select the image size
 (thumbnail, medium, large, full, and custom sizes), refresh the alt text
 from what's stored in the media attachment metadata, replace with a
 different image from the library, and be able to un-attach the media as an
 attachment to the post, and more.

 There is a limitation that prevents this functionality from being
 possible: once the image is inserted into the post as an HTML <img> tag,
 the association of that media back to a media attachment in Wordpress is
 broken. There is no data linking the img tag back to the ID number of that
 image in the media library, except for the CSS class which has the ID
 number, such as: "wp-image-42". The CSS class is unreliable because users
 can inadvertently delete and change CSS class names through the UI.

 I propose a solution: adding a data attribute to the IMG tag, such as
 data-wp-image="42". Javascript could use this data attribute to determine
 the ID number of the image, and be able to fetch the attachment's metadata
 from the database when it pulls up the edit image dialog, giving you
 access to choose other image sizes for that image, refresh the alt text,
 un-attach the media from the post, etc.

 Those are my thoughts and I welcome other ideas and solutions to this
 issue.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/24409>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list