[wp-trac] [WordPress Trac] #28756: wp_editor issues when used in frontend (TinyMCE)

WordPress Trac noreply at wordpress.org
Sat Jul 5 11:22:31 UTC 2014

#28756: wp_editor issues when used in frontend (TinyMCE)
 Reporter:  M-BP          |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  3.9.1
 Severity:  normal        |   Keywords:
  Focuses:  javascript    |
 When using the wp_editor in the frontend multiple issues occur (in trunk
 as well as 3.9.1):

 1. when wp_editor is used with its default configuration, gallery
 shortcodes do not get replaced by the images they represent, for single
 images this is the case - bug or intended behavior?

 2. to replace the shortcodes with a placeholder the TinyMCE plugin
 wpgallery can be used. This works fine. However, when such a
 post/wp_editor field is then edited (or just after it is submitted),
 TinyMCE itself converts the gallery into single images but they cannot be
 edited anymor. They are no longer treated as a gallery but instead as
 single images.

 3. with the plugin wpgallery active, on edits (or after the form is
 submitted) "> shows above all gallery images. See the below markup (see
 the superfluous "> in between):

 <a class="wp-media mceItem wp-gallery" data-mce-
 href="http://localhost/wordpress/wp-content/uploads/2014/07/19.jpg" data-
 mce-placeholder="1" data-wp-media="%5Bgallery-1%5D" rel="prettyPhoto<img
 src=" href="http://localhost/wordpress/wp-content/uploads/2014/07/19.jpg">
 <img class="attachment-thumbnail" width="200" height="200" data-mce-
 alt="19" src="http://localhost/wordpress/wp-


 I have tried all possible TinyMCE settings and plugin combinations but
 these issues persist. I also tried to use JS to regex the "> away but
 unfortunately to no avail.

 I think a possible fix would be to prevent TinyMCE from converting the
 gallery shortcode into single images in the frontend and simply leave
 wpgallery do its thing, namely adding its placeholder which works ok.

Ticket URL: <https://core.trac.wordpress.org/ticket/28756>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list