URLs in TextEditor/Label


#1

Hi

Does anyone implement clickable URLs inside TextEditor?
I guess you need to scan the text searching for ‘http://’ and replacing it with a HyperlinkButton.

Sometimes it spreads for 2 lines…

Jules, is that queueable?

Thanks.


#2

I did that once using the TextEditor component, i did all the work stuff in the listener and it worked and was useful. I lost the code somewhere but i’ll look for it and if i find it i’ll post it here.
Anyway it can be done.

— edit
i found the source it even works, but you need to add the text to the TextEditor using a special method insertTextFormatted but i’m sure you can find a way around it. It’s very old and i take no responsibility if your computer explodes.

[attachment=0]Source.zip[/attachment]


#3

Thanks Atom!

That’s exactly what I needed.