I'm looking for a class or function, or simple method of converting text to html.
I've written a system that allows the site owner to edit his own content. When in logged in mode, he gets by every text block an edit button. When this is clicked, the page refreshes, and in place of the text block is a textarea populated with the current text for that block.
So far, I only have one paragraph per text block, but I'd like to be able to convert line breaks, apostrophes, amperans, etc, to html.
I assume that the client will be using Microsoft Word, copying that text, and then updating. I can explain to him that MS Word uses a lot of strange chars that don't render in html, but I'd much rather convert those to html friendly chars.
I can' imagine that I'm the only one who has ever wanted to do this, so I wonder if anyone has dealt with this issue before and know of a good approach to take, or a pre-written class to do this.
I've looked at txt2html, but have had trouble getting this to work, and it seems to be a work in progress. Any input would help.
Thanks,
DeathMan