How do I stop the editor from stripping my <p>
tags and “empty (& nbsp;)” divs on pages?
Since @scribu asked for a sample code here it is:
Input:
<p>text</p>
<div> </div>
Output:
text
How do I stop the editor from stripping my <p>
tags and “empty (& nbsp;)” divs on pages?
Since @scribu asked for a sample code here it is:
Input:
<p>text</p>
<div> </div>
Output:
text
I had problems with TinyMCE Advanced. I struggled with this for a while. Finally discovered a simple solution – Use Shortcodes!
Place this code into functions.php and enter [br] wherever you want a br tag to appear.
add_shortcode("br", "br_tag");
function br_tag(){
return("<br/>");
}