how do I insert html in textarea

Hi,

My requirement is to insert HTML text in a textarea in one form[it could contain <a href...>cc</a>....<b>..</b> etc] and to be able parse the HTML and show the links in another textarea..in another form...so that the user can click the links...

How do I achieve this..

Thanks
Ram.
smrlnarisettyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

aprestoCommented:
try this - i got it from another thread:

<DIV ID="chip1" contentEditable=true STYLE="LEFT: 134px; OVERFLOW: scroll; WIDTH: 188px; BORDER-TOP-STYLE: inset; BORDER-RIGHT-STYLE: inset; BORDER-LEFT-STYLE: inset; POSITION: absolute; TOP: 75px; HEIGHT: 125px; BORDER-BOTTOM-STYLE: inset">
<b> hello</b> <Font size="5" color=red>Hellllllllooooo  Again!</font>
</DIV>
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
smrlnarisettyAuthor Commented:
it displays fonts and bold letters ..but i need clickable links in it ?
0
aprestoCommented:
http://www.experts-exchange.com/Web/Web_Languages/JavaScript/Q_11827220.html?query=%3Ca+href%3E+in+textarea&clearTAFilter=true

i got the answer from the above:

<script>
/* Links script
   (c) 2000 Michel Plungjan michel@irt.org */
function translate() {
   text = document.myForm.myArea.value

   newText = "";
   if (text.indexOf('link:') !=-1) {
      myLinks = text.split('link:')
      for (i=0;i<myLinks.length;i++) {
         if (myLinks[i]) newText += myLinks[i] +
         '\n<a href="' + prompt('href for >'+myLinks[i]+'< ?','href="http://">http://') + '">' + prompt('text for >'+myLinks[i]+'< ?',myLinks[i])+'</a>';
      }
      text = newText;
   }
   else newText = text;
   alert(text);
}

</script>

Dont ask me what it means, i thought it might help
0
nurbekCommented:
use html editor (WYSIWYG)

http://www.htmlarea.com/
0
aprestoCommented:
grade C, what did we do wrong? oh well, thanks anyway for the points :o)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.