WTH is BBCode and why should you care?
BBCode (“Bulletin Board Code”) is a lightweight markup language used to format messages in much Internet forum software, first introduced in 1998. The available “tags” of BBCode are usually indicated by square brackets ([ and ]) surrounding a keyword, and are parsed before being translated into HTML.
In other words, it’s a simple way of styling text using tags. It is also what you get if you use the rich text editor in Bubble.
So, for example, if you have a text element in Bubble with some style applied, it might look like this:
If you add
[/center] around the text, it gets centered. Or add
[/b], and your text becomes bold:
You can also nest BBCode tags:
And it works with dynamic data:
Feeling lazy? Instead of writing all of this out, you can also just use Bubble’s rich text editor.
So, what are all the things you can do with BBCode? Gald you asked. A lot. Here is a cheat sheet. But color, center, and bold are really the most useful ones for working with Bubble.
Ok, so far, so good. But why should you care?
👉 It helps you to reduce your style library to a minimum and keep it clean and organized. 👈
If you are like me and try to use styles consistently in an app, you often end up with a pretty sizable style library. You will usually have multiple styles for the same font size. One left-aligned, one center-aligned, one in a different color, etc. This is messy and a lot of work if you need to adjust, e.g., the font for all styles for a new app. So, instead of having a style that is left aligned and one that is centered, etc., for the same font type and size, you can just use one single style and use BBCode to change the alignment or color, etc., whenever needed.
That’s it. That simple.
See you in two weeks.
Thanks for reading bubbleHacks! Subscribe for free to receive new posts and support my work.