I'm building a system where an administrator can input news articles into a form, which can then be read by any user accessing the site.
The typical administrator will not be technically savvy. I'd like them to be able to enter straight text with linebreak/carriage returns - let's say two of them between every paragraph - and have PHP process the text and add <p></p> tags around the paragraphs. In other words, wherever it finds a pair of carriage returns, insert </p><p> - plus of course a <p> at the start and a </p> at the end.
Do-able?
The two other things I'd like to be able to do are:
Replace "email@domain.com" with "<a href="mailto:email@domain.com">email@domain.com</a>" and
Replace "http://www.domain.com" with "<a href="http://www.domain.com">http://www.domain.com</a>"
I figure these are some kind of reg expression manipulations. Just thought somebody might have done all this already and can pass along some tips.