Link to home
Start Free TrialLog in
Avatar of bizla
bizla

asked on

Outputting html code to a <textarea> tag

I was thinking of using a <textarea> tag to do this:

e.g.

<textarea><b>example sentence blah blah blah</b><br><hr></textarea>

But i found doing this doesn't translate any of the html tags in between the <textarea></textarea>, and just treats them as normal text.  Is there anyway of getting round this or has anyone got any alternate ideas?

Basically it's for an online diary replies section, where replies are read from the database and fed into this textarea.
Avatar of AmericanDogma
AmericanDogma
Flag of United States of America image

Try using

<textarea><pre>      - Values Here -      </pre></textarea>

values Here would be where all the html you wnat to display in the textbox goes
ASKER CERTIFIED SOLUTION
Avatar of dorward
dorward

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of bizla
bizla

ASKER

Cheers Dorward...works like a charm!

-BIZ-