How do i format dynamic text

I have product descriptions that are in my database. I need to format these texts when they are displayed on the page. I need to put bullets and arrows and even emojis. How do I do that since I’m just going to choose ‘Parent product’s Description’ in the editor?

BBCode.

If you click on that rich text editor link at the bottom of the text, you can do some advanced formatting.

image

At the end, it will spit out a bunch of bbcode. So, if you made a text bold, the text field will now show something like [b]bold text[/b]


(the forum also allows bbcode if you want to practice it. )

1 Like

When I click on ‘Rich text Editor’ all i see as text is ‘Parent Group’s Product Description’ . I can’t format that. putting bold will work. but if the description in the database contains points which i want to display in bullet form and add other formatting characters, it’s impossible.

Change the description in the database with a list. Here’s my cheat bbcode for a list:

[list][*]item 1[/*]
[*]item 2[/*]
[/list]

@rico.trevisan Thanks. I’ll try that.

If you want to find out how Bubble creates and handles bbcode, just put the rich text editor and a multiline input on the page and autobind both of those to the same database text field. You can see how Bubble does its thing (and how it breaks it sometimes).

2021-04-20 23.48.28

Try it here: https://rich-text-editor-test.bubbleapps.io/version-test?debug_mode=true

2 Likes

wow! thanks. i just love this forum

@rico.trevisan I have a similar situation.

I’m trying to format a string of tasks into a list. I’m not sure how to achieve that.


@marius The ‘format as text’ function might be an option. Have you tried this method yet?

I tried that…

  1. If I just add :format as text at the end, I get a null, null, null result.

  2. If I add :format as text and run the same search, I get lots of duplicates.

:man_shrugging:

Maybe with the ‘unique’ operator at the end? :thinking:

Just spit ballin here lol.

It might be risky, but you could do a find and replace for the , (comma and ensuing space) and replace it with [/*][*]. I think that would transform

... Catalog Sync, Standup, Happy Hour

into

... Catalog Sync[/*][*]Standup[/*][*]Happy Hour

Which might just work. If I’m not mistaken each [/*] adds a newline, too. I think.


But…
Could you not make an RG with the source being Search for Tasks. Then have a text element with This Task's Task Description?

@rico.trevisan @lantzgould Y’all put me on the right path! Thank you!

@lantzgould :Format as text worked! the reason I was getting duplicates was because I was re-running the search inside the format as text input. Instead all I had to do it use “This text”


and then press return in the delimiter to have everything display as a list.

@rico.trevisan I already have all the tasks displayed in a RG. But I wanted to create a “stand up” like check in modal with a copy to clipboard action - so users can share their progress with their team.

(don’t mind the design - it’s messy)
CheckIn

Thank you both so much for your help!

2 Likes

Nice!

Interesting use to set it up with the copy-paste functionality.

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