I'm trying to produce a html form (pretty similar to the one I'm typing in now) where the user can enter a load of text and then format it by making it bold, change colour etc and then store the text and all the formatting in a mysql databases through PHP.
Dose anyone know how to do the formatting bit, is it javascript or some kind of PHP function. Does anyone know of any good tutorials or any pre-written scripts for this purpose?
Text formatting in html forms with javascript?
Moderator: General Moderators
-
magicrobotmonkey
- Forum Regular
- Posts: 888
- Joined: Sun Mar 21, 2004 1:09 pm
- Location: Cambridge, MA
No, not really. It can be done just as well or better server-side. No matter what, you need a parser that can detect special character tags you've set up and then replace them with the relevant HTML.
personally, I wouldn't bother writing your own, and just use Textile. http://www.textism.com/tools/textile/
personally, I wouldn't bother writing your own, and just use Textile. http://www.textism.com/tools/textile/