Title: Comment editor using wp_editor won&#039;t submit
Last modified: August 21, 2016

---

# Comment editor using wp_editor won't submit

 *  [1db](https://wordpress.org/support/users/1db/)
 * (@1db)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/comment-editor-using-wp_editor-wont-submit/)
 * I’ve used wp_editor to replace the default comment editor in my WordPress install,
   and it looks beautiful and functions just as it’s supposed to…when you’re typing.
   But when I click “Submit,” I get this error:
 * “Error: Please type a comment.”
 * This is the entire code for that section:
 *     ```
       <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
       	<?php wp_editor( $listing->post_content, 'listingeditor', $settings = array('textarea_name' => post_content, 'textarea_rows' => 8) ); ?>
       	<input type="submit" class="commentsubmit" value="Submit" />
       	<?php comment_id_fields(); ?>
       	<?php do_action('comment_form', $post->ID); ?>
       </form>
       ```
   

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/comment-editor-using-wp_editor-wont-submit/#post-3693528)
 * > I’ve used wp_editor to replace the default comment editor in my WordPress install,
 * Sorry? You did what?
 *  Thread Starter [1db](https://wordpress.org/support/users/1db/)
 * (@1db)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/comment-editor-using-wp_editor-wont-submit/#post-3693539)
 * In the form, I replaced this:
 * `<textarea name="comment" id="comment" rows="10" cols="" class="textbox"></textarea
   >`
 * …with this:
 * `<?php wp_editor( $listing->post_content, 'listingeditor', $settings = array('
   textarea_name' => post_content, 'textarea_rows' => 8) ); ?>`
 * That displays the TinyMCE editor, and it works while typing but it won’t submit.
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/comment-editor-using-wp_editor-wont-submit/#post-3693740)
 * Remove that change and try looking a suitable comment editor plugin instead.
 *  [webbistro](https://wordpress.org/support/users/webbistro/)
 * (@webbistro)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/comment-editor-using-wp_editor-wont-submit/#post-3693973)
 * I’ve found this snippet
 *     ```
       add_filter( 'comment_form_defaults', 'custom_comment_form_defaults' );
       function custom_comment_form_defaults( $args ) {
           if ( is_user_logged_in() ) {
               $mce_plugins = 'inlinepopups, fullscreen, wordpress, wplink, wpdialogs';
           } else {
               $mce_plugins = 'fullscreen, wordpress';
           }
           ob_start();
           wp_editor( '', 'comment', array(
               'media_buttons' => true,
               'teeny' => true,
               'textarea_rows' => '7',
               'tinymce' => array( 'plugins' => $mce_plugins )
           ) );
           $args['comment_field'] = ob_get_clean();
           return $args;
       }
       ```
   
 * It works like a charm!
 * Source: [http://www.revood.com/blog/adding-visual-editor-to-wordpress-comments-box-part-2/](http://www.revood.com/blog/adding-visual-editor-to-wordpress-comments-box-part-2/)

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Comment editor using wp_editor won't submit’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 3 participants
 * Last reply from: [webbistro](https://wordpress.org/support/users/webbistro/)
 * Last activity: [12 years, 6 months ago](https://wordpress.org/support/topic/comment-editor-using-wp_editor-wont-submit/#post-3693973)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
