Do Bbcode links have to always go to a new tab?

Hi

I’ve built a dynamic menu for my app where there is a catalogue of pages and their menu structure into parent and child menu items. They spring open and closed with expander and contractor icons.

I used a repeating group inside a repeating group for this. When I’ve pulled the data out of the database I then use a text component containing dynamic text for the bbcode for URL to create the link itself to the correct page.

My trouble is that all my links are opening in new tabs. Is there a way to stop this happening? I’m not a bbcode or bubble expert (yet).

Any help greatfully received.

Richard

i have same problem. how to disable open new tabs after click link inside in richtext format. tthanks

I never got an answer to this. Unfortunately this forum is happy discussing big philosophical issues about how to design your app, but not always helping with simple things. The number of small help posts just ignored by the regulars is disappointing.

What I did to solve this was change from using text with BB code to using dynamic generated html where I crafted my own links in an

<a href=> blah blah </a>

style

2 Likes

@richard6 an @codkod: OK, here ya go… like this:

The url parameter in bb code (at least in Bubble) does accept the target parameter. Who knows what other parameters it might accept?

https://www.w3schools.com/tags/att_link_target.asp

Aside: Some of the reasons that seemingly simple questions do not get answered in the forums is it takes just as much time for a respondent to find the answer as it would take you.

In this case, for example, I’m like, “Well, I dunno about bb code and I can’t recall how one forces a link to open in the same page.” So, I go Google:

link open in same page

And instantly have an answer to that question: Add target=“_self”.

OK, now does that work in Bubble in bb code? Well, the only way to know is to try it.

So I now I gotta go make a text element, throw some crap in it, open the RTF editor (because I don’t do much with bbcode), make a link, go back to the standard editor, add target=“_self”, enter preview and see what happens.

Like, you could have done that too, right?

Don’t get me started on the questions the answers to which would be: “Do the tutorials/lessons” or “RTFM.”

15 Likes

Lifesaver @keith Thanks

1 Like

@keith this was really helpful - thank you!

One small issue I’m running into is that even though no new tab is opened, I’m still getting the below pop-up on Chrome after implementing your solution

Screenshot 2021-10-26 at 20.46.43

If anyone has found a solution to this it would be great to know…

1 Like

Worth noticing is that the target parameter isn’t supported if “Recognize links and emails” is checked for the same text element. Took me some time to debug that one, so posting in case someone else experiences the same problem.

1 Like