Text Area field have urls become clickable hypertext links

You mean when rendered as read only (list or details views)?

I think the answer is no, but just checking what you mean.

-- hugh
 
Yes Displaying it in List or Detail view... like when you paste a link into an email message say in gmail the link text becomes clickable hypertext. Can this be accomplished by creating an email or pdf within Fabrik framework? Like you can do here in a forum post?

Pulling in the field then something like this to display it...

while($info = mysql_fetch_array( $data ))
{
Print "" .$info['sitetitle'] . "
";
}


Or use this snippet as the text area field is being pasted in or when form is submitted:

function makeClickableLinks($text)
{ $text = eregi_replace('(((f|ht){1}tp://)[-a-zA-Z0-9@:%_+.~#?&//=]+)', '<a href="\1">\1</a>', $text);
$text = eregi_replace('([[:space:]()[{}])(www.[-a-zA-Z0-9@:%_+.~#?&//=]+)', '\1<a href="http://\2">\2</a>', $text);
$text = eregi_replace('([_.0-9a-z-]+@([0-9a-z][0-9a-z-]+.)+[a-z]{2,3})', '<a href="mailto:\1">\1</a>', $text);

return $text;
}$text = "This is my first post on http://blog.koonk.com";$text = makeClickableLinks($text);
echo $text;

And yes I know eregi_replace is depricated.... but you can see what I am trying to suggest

or

function replaceURLWithHTMLLinks(text){
var exp =/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig;
return text.replace(exp,"<a href='$1'>$1</a>");
}
 
Last edited:
I'm sure it'd be possible, and we have some helper code that does stuff like that, but adding it to the textarea as an option would be half an hour's work or so (it's not difficult, just tedious work adding all the params to the xml, language strings, code, etc), and adding new features on request isn't something we do in Community support.

-- hugh
 
The code exists for field elements, but not for textarea. It'd be bit more work for textareas, having to tokenize the text and check each "word", but wouldn't be difficult.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top