I always find myself in HTML mode in the editor to try and get simple things like breaks between paragraphs to show up right (using <p></p>). Is that normal? Is there a better editor out there that I could use?

6 s
6

What happens is that TinyMCE converts every double line break in the HTML source to <p></p> and vice versa. It will actually strip away any <p/> you manually enter in the HTML source after you save, because when the post’s content is rendered, <p> and </p> will be added.

The auto-<p> replacement only works when you’re rendering a post’s content with <?php the_content() ?>, if you output $post->post_content directly, it won’t go through the same formatting hooks and will look plain and without line breaks or paragraphs.

If what you want is lots of <br/> tags in the rendered markup, you should probably find a better solution based on CSS and the use of the margin or padding CSS properties.

Leave a Reply

Your email address will not be published. Required fields are marked *