[wp-trac] [WordPress Trac] #27904: TinyMCE4 Image Button

WordPress Trac noreply at wordpress.org
Mon May 19 20:47:27 UTC 2014


#27904: TinyMCE4 Image Button
-------------------------------------+----------------------
 Reporter:  josh401                  |       Owner:
     Type:  defect (bug)             |      Status:  closed
 Priority:  normal                   |   Milestone:  3.9.1
Component:  TinyMCE                  |     Version:  3.9
 Severity:  normal                   |  Resolution:  wontfix
 Keywords:  reporter-feedback close  |     Focuses:
-------------------------------------+----------------------

Comment (by harmr):

 Hi guys,
 may I ask your help on this issue? I also use a custom tinymce editor both
 on my free and premium plugin (demo: https://demo.mapsmarker.com/wp-
 admin/admin.php?page=leafletmapsmarker_marker - no login required) and
 users have reported that the image edit buttons are not showing up anymore
 when hovering an added image since WP3.9.

 I use the following code to load the editor:

 {{{
 $popuptext_sanitzed = '...';
 $settings = array(
         'wpautop' => true,
         'tinymce' => array(
                 'height' => '250',
                 'setup' => 'function(ed) {
                                                 ed.on("keyup",
 function(ed,e) {
                                                         ...
                                                         unsaved = true;
                                                 });
                                 }'
          ),
 'quicktags' => array('buttons' =>
 'strong,em,link,block,del,ins,img,code,close'));
 wp_editor( $popuptext_sanitized, 'popuptext', $settings);
 }}}

 so after reading this ticket I tried to change my code into
 {{{
 $popuptext_sanitzed = '...';
 $settings = array(
         'wpautop' => true,
         'tinymce' => array(
                 'plugins' => 'image',
                 'height' => '250',
                 'setup' => 'function(ed) {
                                                 ed.on("keyup",
 function(ed,e) {
                                                         ...
                                                         unsaved = true;
                                                 });
                                 }'
          ),
 'quicktags' => array('buttons' =>
 'strong,em,link,block,del,ins,img,code,close'));
 wp_editor( $popuptext_sanitized, 'popuptext', $settings);
 }}}

 Didn´t work though.

 I also tried to add the tinymce_plugins filter in the main plugin file,
 but this did also not work (not so sure about the usage here, so perhaps
 this is the issue, as I tried different ways:
 {{{
 apply_filters( 'tiny_mce_plugins', 'image', 'popuptext');
 apply_filters( 'tiny_mce_plugins', array(&$this, 'image', 'popuptext'));
 ...
 }}}

 Any hint on how to solve this would really be appreciated!
 thx,
 Robert

--
Ticket URL: <https://core.trac.wordpress.org/ticket/27904#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list