Parsing HTML Tags inside the Text Area
I am a newbie to JS.
Currently i need to assign the value to the textarea while loading the page. As its the Div Element, when i am giving the URL in the textarea, it shows as link.
Now I need to Print the Reference Value of that URL instead of a link.
var y = "Google Link";
Its printing the link as <a href="www.google.com">Google Link</a>
Please help .
Are you trying to put an active hyperlink into a textarea element? If so, I don't think this is possible. What you can do however is put the link into an element such as a div such as:
which can be used with proper care as a substitute for a textarea element.
div Contenteditabe is true. and i am able to print the url in TextArea as URL.
But i need the Reference Name to be Shown instead of URL as the hyperlink.
working Perfectly and shows the URL.
Instead of www.google.com I need "Google Link" to be printed as the reference Name.
Once again, I'm not entirely sure what you want to be doing here. Why can't you just have:
in your HTML?
<div id="text" contenteditable="true">
<a href="http://www.google.com">Google Link</a>
Or does the link need to be added dynamically?
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)