Suraj Dalvi
Suraj Dalvi

Reputation: 1078

P and br tag is not displayed in Wordpress Database

I have installed tinymce-advanced plugin and click Stop removing the p and br tags when saving and show them in HTML editor option in plugin setting and save it.I have created a post and publish it. But, When I have fired query on WordPress Database. It not showing me that p and br tag.Please help me into this?

Upvotes: 0

Views: 897

Answers (1)

Purvik Dhorajiya
Purvik Dhorajiya

Reputation: 4870

Here's (a pared-down version of) what I use to custom-configure TinyMCE:

function custom_tinymce_config( $init ) {
    // Don't remove line breaks
   $init['remove_linebreaks'] = false; 
   // Convert newline characters to BR tags
   $init['convert_newlines_to_brs'] = true; 
   // Do not remove redundant BR tags
   $init['remove_redundant_brs'] = false;

    // Pass $init back to WordPress
    return $init;
}
add_filter('tiny_mce_before_init', 'custom_tinymce_config');

Would you please add above code in your current theme functions.php?

Play around with the TinyMCE configuration parameters, and find the one that you need to change.

Upvotes: 2

Related Questions