Support » Developing with WordPress » TinyMCE Can’t reply to comments

  • I added the code below to function.php in order to enable TinyMCE in post comments.
    It works fine when writing comments, but when I’m trying to reply to comments, the visual layout not working. There is no cursor, and I can’t type anything.

    This is the code:

    add_filter( 'comment_form_defaults', 'using_tinymce_comment' );
    function using_tinymce_comment ( $args ) {
        ob_start();
        wp_editor( '', 'comment', array('tinymce') );
        $args['comment_field'] = ob_get_clean();
        return $args;
    }

    I tried to change my theme to twenty-twenty and twenty-twenty-one.
    I also used the Site Health plugin to disable all plugins.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter mypcbasics

    (@mypcbasics)

    up

    I have the same problem. Did you find a solution?

    Thread Starter mypcbasics

    (@mypcbasics)

    @mkmllr I used the rich text instead:

    add_filter( 'comment_form_defaults', 'rich_text_comment_form' );
    function rich_text_comment_form( $args ) {
    	ob_start();
    	wp_editor( '', 'comment', array(
    		'media_buttons' => false, // show insert/upload button(s) to users with permission
    		'textarea_rows' => '5', // re-size text area
    		'dfw' => false, // replace the default full screen with DFW (WordPress 3.4+)
    		'tinymce' => false,
    		'quicktags' => array(
     	       'buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,close'
    	    )
    	) );
    	$args['comment_field'] = ob_get_clean();
    	return $args;
    }
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘TinyMCE Can’t reply to comments’ is closed to new replies.