Hey all!
I'm trying to change the way that the rich text editor processes posts.
If I write the following inside the visual tab:
Hi,
This is a paragraph.
And this is a line break inside the paragraph.
This is a new paragraph.
A few things come to notice.
First of all, if I inspect the rich editor I can see that each line is in its own paragraph, like below:
<p>Hi,</p>
<p> </p>
<p>This is a post.</p>
<p>And this is a line break in the same paragraph.</p>
<p> </p>
<p>This is a new paragraph.</p>
Also, if I head over to the HTML/text tab, I see this:
Hi,
 
This is a post.
And this is a line break in the same paragraph.
 
This is a new paragraph.
Finally, if I look on the actual blog page itself. It has trimmed all the white lines and wrapped each sentence in a paragraph tag:
<p>Hi,</p>
<p> </p>
<p>This is a post.</p>
<p>And this is a line break in the same paragraph.</p>
<p> </p>
<p>This is a new paragraph.</p>
I have to use the wpautop() function to get the same result on the blog page as inside the wysiwyg editor.
However this is not the issue here. The thing I would like to know is where and how I can change the way that WordPress processes post content before it gets inserted to the database.
Any help is appreciated :-)
Virt