tags:

views:

84

answers:

1

Basically at the moment I have:

http://link.com - plain text

I would like:

<a href="http://link.com"&gt;http://link.com&lt;/a&gt;

Is it possible to automatically add 'a href'?

If so how should I go about doing it?

+1  A: 

Yes, you could parse your text on load with javascript. By using the appropriate regular expression, just replace each link with the anchored link version.

text.replace(**link regular expression**, "<a href=\"$1\">$1</a>");

Note: The syntax is probably not right, but you get the idea.

GoodEnough