[wp-trac] [WordPress Trac] #52050: White TinyMce editor from wp_editor function on a meta box on WP 5.6

WordPress Trac noreply at wordpress.org
Sat Dec 12 18:38:19 UTC 2020


#52050: White TinyMce editor from wp_editor function on a meta box on WP 5.6
--------------------------+-----------------------------
 Reporter:  sweetheatmn   |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  5.6
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 wp_editor function returns a white TinyMCE that is not responding on
 metabox when quicktags is disabled or when the default_editor is set to
 tinyMCE

 test code


 {{{
 function wporg_add_custom_box() {
         $screens = [ 'post', 'wporg_cpt' ];
         foreach ( $screens as $screen ) {
                 add_meta_box(
                                 'wporg_box_id',                 // Unique
 ID
                                 'Custom Meta Box Title',      // Box title
                                 'wporg_custom_box_html',  // Content
 callback, must be of type callable
                                 $screen                            // Post
 type
                                 );
         }
 }
 add_action( 'add_meta_boxes', 'wporg_add_custom_box' );

 function wporg_custom_box_html( $post ) {
          $args = array('quicktags' => false);
          wp_editor(  'Welcome to WP'  , 'test-editor', $args );
 }
 }}}

 returned editor that does not contain the content or is editable

 https://monosnap.com/file/5FY44sq063vHgPMp6Ib50mKGZsTCQx

 Expected result: normal TinyMCE editor that contains the content and is
 editable

 Regards,
 Atef

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


More information about the wp-trac mailing list