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

WordPress Trac noreply at wordpress.org
Wed May 21 17:05:12 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):

 thanks azaozz - that worked. For the record - I use the following code now
 for applying the custom css via filter:


 {{{
 function lmm_plugin_mce_css( $mce_css ) {
         global $wp_version;
         $lmm_options = get_option( 'leafletmapsmarker_options' );
         $defaults_marker_popups_maxwidth =
 intval($lmm_options['defaults_marker_popups_maxwidth'] + 1);
         $defaults_marker_popups_image_css =
 urlencode(htmlspecialchars($lmm_options['defaults_marker_popups_image_css']));
         $custom_tinymce_css = LEAFLET_PLUGIN_URL . 'inc/css
 /leafletmapsmarker-admin-tinymce.php?defaults_marker_popups_maxwidth=' .
 $defaults_marker_popups_maxwidth . '&defaults_marker_popups_image_css=' .
 $defaults_marker_popups_image_css .
 '&wordpress_version='.$wp_version.'&timestamp='.time();
         if ( ! empty( $mce_css ) ) {
                 $mce_css .= ',';
         }
         $mce_css .= $custom_tinymce_css;
         return $mce_css;
 }
 add_filter( 'mce_css', 'lmm_plugin_mce_css' );
 }}}

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


More information about the wp-trac mailing list