[wp-trac] [WordPress Trac] #63332: wp_editor_settings filter hook not working as expected in WordPress Admin

WordPress Trac noreply at wordpress.org
Tue Apr 22 10:55:10 UTC 2025


#63332: wp_editor_settings filter hook not working as expected in WordPress Admin
--------------------------+-----------------------------
 Reporter:  jaspinder91   |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Comments      |    Version:  6.8
 Severity:  normal        |   Keywords:  needs-patch
  Focuses:                |
--------------------------+-----------------------------
 I am using classic editor in my local WordPress installation.

 I enabled comments form in single post admin screen.

 I need to show the tinymce editor inside comment form by default, so for
 this I used wp_editor_settings filter hook mentioned here ->
 https://developer.wordpress.org/reference/hooks/wp_editor_settings/.

 I use the following code for enabling classic editor and showing tinymce
 by default in comments form:

 add_filter( 'use_block_editor_for_post', '__return_false' );
 add_filter( 'use_widgets_block_editor', '__return_false' );
 add_action( 'wp_enqueue_scripts', function() {
     wp_dequeue_style( 'wp-block-library' );
     wp_dequeue_style( 'wp-block-library-theme' );
     wp_dequeue_style( 'global-styles' );
     wp_dequeue_style( 'classic-theme-styles' );
 }, 20 );


 add_filter( 'wp_editor_settings', 'modify_call_comment_box', 10, 2 );
 function modify_call_comment_box( $settings, $editor_id ) {
         $settings = array(
                 'default_editor' => 'tinymce',
         );
         return $settings;
 }


 Issue:

 When I create or edit the post and hit the Add comment button, tinymce
 editor in comments form is showing but I am not able to add any content
 inside the editor. Moreover, I can see a javascript error in the console
 also which shows some error in wp-includes/js/tinymce/wp-tinymce.js file.

 There are no plugins installed and twenty-twenty-four theme is installed
 in my wordpress installation.

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


More information about the wp-trac mailing list