automatic <p> tag insertion in Text editor only, not in visual editor (wordpress)

how to remove the automatic insertion of <p> </p> in text entry fields only, not in visual editor…

I put this in my function.php

Read More
remove_filter( 'the_content', 'wpautop' );
remove_filter( 'the_excerpt', 'wpautop' );

It remove the auto <p> tag both text and visual editor is this possible to remove the <p> tag in text editor only… not in visual.

Related posts

Leave a Reply

1 comment

  1. Paragraph tags are added when the Posts content is displayed and not when its stored in the database. You will not notice the paragraph tags when switching from Visual to Text mode or even when you view the posts content stored in the database using PHPMyAdmin or some similar means.

    Check the following link to see the list of filters are applied when database writes happen for Post, Pages & Attachments

    http://codex.wordpress.org/Plugin_API/Filter_Reference#Database_Writes