Link recognition within a multiline input

Hi everyone,

I’m fairly new to bubble (I started learning in October and have since completed the "Getting started with bubble in 2024 playlist)

I’m currently building a social media app and I would like users to be able to add a link in their post content, I would like to then pull that link in to be displayed in the posts section on the feed or user profile, with a thumbnail included.

I’m thinking of things being similar to the way that Facebook allows people to post a YouTube or other link and having it both display the thumbnail as well as the link on the post.

How do I tell bubble to recognize that part of the text within the multiline input is a link, for it to populate in the posts section?

I’ve read about setting up Regex but am a bit confused on how to go about that.

Thanks in advance

there are plugins that do this for you - checkout a few of the text editor plugins

there’s one that recognizes links and also tagged people @mitchbaylis etc

1 Like

Do you have any recommednations to start with?
Like the bubble rich text editor by chance?

I forget which text editor it was but there is also “tagger” plugin which extracts tags and urls from text

1 Like

So I downloaded that but it just recognizes the links as they are, which the input already does.

The part I’m struggling with is then using that input data (only the link, none of the other text) and using it to populate a clickable thumbnail.

hmm, I looked for that text plugin I had used before but I can’t find it - probably was removed

you could always use regex on the text to extract the links

add repeating group with data source text:regex and then set the data type to text and then show the regexs matched links in the repeating group

No worries, thanks for checking.

I’m a bit confused on regex. It seems to be a character template? I tried to set it up but it didn’t work and I couldn’t find anything about using them. (I don’t have a backend coding background and those characters were intimidating haha).

try putting it into chatgpt to write the regex

something like this
(?:https?://)?(?:www.)?[^\s/$.?#].[^\s]*

1 Like

Okay cool. I got that set up I think.

I’m trying to have this populate within an existing repeating group, to populate in the “YouTube Video Player” as part of a post but the player is black and doesn’t do anything when clicked.

This topic was automatically closed after 70 days. New replies are no longer allowed.