Suppose there is a line where the text is mixed up as there is no text enclosed in p tags:
раз два <p>три <a href='#'>четыре</a> пять</p> <img src="#">шесть <strong>семь</strong> <p>восемь</p> девять десять Can anyone have an example of how all the text is not enclosed in p, to conclude in it:
<p>раз два</p> <p>три <a href='#'>четыре</a> пять</p> <p><img src="#">шесть <strong>семь</strong></p> <p>восемь</p> <p>девять десять</p> The text is organized without line feeds.
I tried the example https://stackoverflow.com/questions/5961217/how-do-i-surround-all-text-pieces-with-paragraph-tags?answertab=active#tab-top (nl2p_html) but it eats all the attached tags .