Why does the text editor remove paragraphs and line breaks?
Surely maintaining basic formatting such as paragraphs or line breaks is a basic requirement in all CMS systems. It's hard to believe that WordPress has remained the most popular content management system on the market when it's not even able to maintain basic text formatting.
I've searched numerous forums - all of which recommend the TinyMCE Advanced plugin or manipulating the wpautop()
function - but nowhere is there a clear explanation of:
why Wordpress removes paragraphs and line breaks in the first place;
what is best practice for stopping the text editor from behaving this way.
<p>
and<br>
tags when typing in the Text view (note it's not HTML view). When they add a line break in the editor, they expect a line break on the front end. As such it needs to dynamically add and remove them, and this is an imperfect process. You might want to say "the Text view should just be for developers!" or something like that, but clearly that's not how people are using it, and it has not stopped (and arguably helped) WordPress becoming the most popular CMS, as you say.