Jump to content
Larry Ullman's Book Forums

Recommended Posts

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...