briansgl Posted May 4, 2014 Share Posted May 4, 2014 Just a question really. I have a basic text area on a form that's coded like below: <tr> <td valign=top><font class="smalltext"><b><strong> Description:</strong></b></font></td> <td><font class="smalltext"> <textarea rows=12 cols=55 name=description></textarea> </font></td> </tr> <tr> What I was wanting to know was can I add some formatting like the user being to make the text bold, change colour, Centre, left, right and justify. You know the normal formatting aids. Is this difficult to do. I have done a search on the internet "Text box with formatting" but the stuff that comes up is not what I was really looking for. Link to comment Share on other sites More sharing options...
Antonio Conte Posted May 4, 2014 Share Posted May 4, 2014 What you need is a parsing system. A common format is BBCode, the system also used on this forum. It removes the security issues related to allowing HTML in text, while allowing styled text. You should be able to google it for more information. Link to comment Share on other sites More sharing options...
HartleySan Posted May 5, 2014 Share Posted May 5, 2014 As Antonio said, using a solution that already exists would probably be best. It's not necessarily that hard to do, but it does require a decent amount of JS knowledge, and how to handle cross-browser issues. Link to comment Share on other sites More sharing options...
Recommended Posts