I have textarea containing one or more URLs, along with other text content. I want a JavaScript function to return the text content along with the correctly formatted URL with anchor tags.
Example contents:
abcd http://stackoverflow.com xyz
I would like the function to return:
abcd <a href="http://stackoverflow.com">http://stackoverflow.com</a> xyz
What steps are needed to implement this request?
would be grateful for help.
1 Answer