The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Threaded View

tinymce: how to force use of <p> if only one line of text?

i discovered that if i just enter "test test test" into a basic tinymce textarea, it doesnt store any html in the db. only when i hit enter at the end of a line does it wrap <p> around both sentences. and, if i just paste a block of text in to tinymce (no linebreaks), it doesnt add html markup either

so i have to tell client to hit enter at the end of any sentence, or the db just returns text with no html markup. i cant use the code below either cause what if they enter two lines? in that case there will be two <p>'s wrapped around the text?

Code:

<p><? echo row['text'];?></p>

anyone know how to get around this?

I need someone to protect me from
all the measures they take in order to protect me