BBcode Reference
Text Decoration
BBcode syntax | Rendered text |
---|---|
[b]bold[/b] | bold |
[i]italic[/i] | italic |
[u]underlined[/u] | underlined |
[s]strike[/s] | |
super[sup]script[/sup] | superscript |
sub[sub]script[/sub] | subscript |
[color=red]red[/color] | red |
[hl]highlighted[/hl] | highlighted |
[font=courier]some text[/font] | some text |
[quote]quote[/quote] | quote |
[quote=Author]Author? Me? No, no, no...[/quote] | Author wrote:Author? Me? No, no, no... |
[size=small]small text[/size] [size=xx-large]xx-large text[/size] [size=20]20px exactly[/size] ' Size options include: xx-small, small, medium, large, xx-large | small text xx-large text 20px exactly |
Add a horizontal bar [hr] Like this | Add a horizontal bar Like this |
This is [center]centered[/center] text | This is centered text |
Code blocks
Code can be rendered generically in a block or inline format (depending on if there are new line characters in the text), or you can specify a supported language for enhanced syntax highlighting. Syntax highlighting requires a suitable rendering addon. Supported languages depend on the addon but may include include php, css, mysql, sql, abap, diff, html, perl, ruby, vbscript, avrc, dtd, java, xml, cpp, python, javascript, js, json, sh .If a rendering addon is not installed or an unsupported language is specified, the output for syntax highlighted code blocks is the same as the block format code tag.
BBcode syntax | Output |
---|---|
[code]function bbcode() { }[/code] | function bbcode() { } |
[code=php] function bbcode() { $variable = true; if ( $variable ) { echo "true"; } } [/code] | function bbcode() { |
[nobb]This is how [i]you[/i] can [u]show[/u] how to use [hl]BBcode[/hl] syntax[/nobb] | This is how [i]you[/i] can [u]show[/u] how to use [hl]BBcode[/hl] syntax |
Lists
BBcode syntax | Rendered list |
---|---|
[ul] [*] First list element [*] Second list element [/ul] |
|
[ol] [*] First list element [*] Second list element [/ol] |
|
[list=A] [*] First list element [*] Second list element [/list] The list type options are 1, i, I, a, A. |
|
Tables
BBcode syntax | Rendered table | ||||||
---|---|---|---|---|---|---|---|
[table border=0] [tr][th]Header 1[/th][th]Header 2[/th][/tr] [tr][td]Content[/td][td]Content[/td][/tr] [tr][td]Content[/td][td]Content[/td][/tr] [/table] |
| ||||||
[table border=1] [tr][th]Header 1[/th][th]Header 2[/th][/tr] [tr][td]Content[/td][td]Content[/td][/tr] [tr][td]Content[/td][td]Content[/td][/tr] [/table] |
| ||||||
[table] [tr][th]Header 1[/th][th]Header 2[/th][/tr] [tr][td]Content[/td][td]Content[/td][/tr] [tr][td]Content[/td][td]Content[/td][/tr] [/table] |
|
Links and Embedded Content
BBcode syntax | Output |
---|---|
[video]video URL[/video] [video poster="image.jpg"]video URL[/video] [audio]audio URL[/audio] | |
[url=https://codeberg.org/streams]Code[/url] | Code |
An image [img]https://example.org/image.jpg[/img] in some text | An image in some text |
An image with alt text [img alt="photo description"]https://example.org/image.jpg[/img] | An image with alt text |
Platform specific codes
These codes may not work correctly with other fediverse-enabled software.BBcode syntax | Output |
---|---|
Magic-auth version of [url] tag [zrl=https://macgirvin.com]Identity-aware link[/zrl] | |
Magic-auth version of [img] tag [zmg]https://hubzilla.org/some/photo.jpg[/zmg] | Image is only viewable by those authenticated and with permission. |
Observer-dependent output: [observer=1]Text to display if observer IS authenticated[/observer] | |
[observer=0]Text to display if observer IS NOT authenticated[/observer] | |
[observer.language=en]Text to display if observer language is English[/observer] | |
[observer.language!=de]Text to display if observer language is not German[/observer] | |
[observer.url] | channel URL of observer |
[observer.baseurl] | website of observer |
[observer.name] | name of observer |
[observer.webname] | short name in the url of the observer |
[observer.address] | address (fediverse-id) of observer |
[observer.photo] | profile photo of observer |
What is a spoiler? [spoiler]Text you want to hide.[/spoiler] | What is a spoiler? Click to open/close |
[rpost=title]Text to post[/rpost] The observer will be returned to their home hub to enter a post with the specified title and body. Both are optional | https://streams.elsmussols.net/rpost?f=&title=title&body=Text+to+post |
Generate QR code This requires the qrator addon. [qr]text to post[/qr] | |
This requires a suitable map addon such as openstreetmap. [map] | Generate an inline map using the current browser coordinates of the poster, if browser location is enabled |
This requires a suitable map addon such as openstreetmap. [map=latitude,longitude] | Generate a map using global coordinates. |
This requires a suitable map addon such as openstreetmap. [map]Place Name[/map] | Generate a map for a given named location. The first matching location is returned. For instance "Sydney" will usually return Sydney, Australia and not Sydney, Nova Scotia, Canada unless the more precise location is specified. It is highly recommended to use the post preview utility to ensure you have the correct location before submitting the post. |
[&​copy;] | © |