Discourse BBCode

:information_source: Summary Discourse BBCode adds the ability to use BBCode to format posts.
:discourse2: Hosted by us? This plugin is available on our Enterprise plans
:mechanic: Self-host Install Install plugins on a self-hosted site
:hammer_and_wrench: Repository Link https://github.com/discourse/discourse-bbcode

The Discourse BBCode plugin enhances the Markdown composer [1] with support for the BBCode syntax beyond what is included by default (i.e. [i], [b], [s], [u], [quote], [url], [email] and [code]) to provide a more “BBCode” ™ experience.

Features

Inline constructs

Inline constructs that can be embedded in paragraphs [s]like so[/s].

  • [size=SIZE] : set the size of text

  • [font=FACE]: set the font face for text

  • [color=COLOR]: set the [color=#381]color[/color] of text [/li]

  • [bgcolor=COLOR]: set background color of text

  • [highlight]: Highlight text

  • [small]: Make text very small

  • [aname=NAME]: create an anchor in your document with a name

  • [jumpto=NAME]: jump to anchor created with aname

Multiline constructs

Multline (or block level) constructs encompass a block of text.

[right]
Like this example
[/right]

Multiline constructs must never start or end in the middle of a line.

Lists

[list]
* item
* item
[/list]

or

[ol]
[li]this is a list item[/li]
[/ol]

or

[ul]
[*] this is an item
[*] this is **an** item
[/ul]

Text alignment

[center]
Center some text
[/center]

[right]
Right align some text
[/right]

[left]
Left align some text
[/left]

:warning: Caution: These features can easily be used for abuse by hiding text and making text unreadable. BBCode will also make your markup less understandable.


  1. This plugin is not built for the rich text mode of the composer, so you may need to use the image toggle to switch to Markdown mode when using these codes. If your community relies on this plugin, you can update the default_composition_mode site setting to ensure that members see the Markdown mode of the composer by default. ↩︎

Last edited by @lindsey 2025-10-23T20:00:40Z

Check documentPerform check on document:
49 לייקים

3 posts were split to a new topic: Is [hide] supported in the BBCode plugin?

8 posts were split to a new topic: Add composer buttons for tags added by BBCode plugin(s)

Hey, guys.
I don’t know in which topic it is better to write, but I think this one is suitable) the other one was closed.
I’ve improved one planin a bit.
Sharing it with you for review.

[note]Это обычная заметка[/note]

[info]Это информационная заметка[/info]

[warn]Это предупреждение[/warn]

[negative]Это ошибка[/negative]

[positive]Это успех[/positive]

[caution]Это важное предупреждение[/caution]

dark / light detecting
And administrator settings allowed too.

4 לייקים

There is also a theme component for this by the way

4 לייקים

אוי, אחי.
חצי יום התבזבז על יצירת זה… וחיפשתי מימוש… ולא מצאתי שום דבר בעל ערך!
תודה!

2 לייקים

האימות אם קריאות החוץ הזכיר מתישהו יצירת תוסף. אז אולי אפשר לגרום לשניים לתת נתיב ל-TC (בצד הלקוח) ולתוסף (בצד השרת).

אני מאמין שהתוסף שלך יהיה ידידותי יותר לדברים כמו הדפסה ל-PDF.

התוסף שלך למשל לוקח בחשבון אור/חושך.

2 לייקים

אם אפשר להשתמש בתוסף הזה לרעה כפי שצוין, יהיה הגיוני לאפשר להגביל את השימוש בו לפי קטגוריה או לפי רמת משתמש. כרגע אין יכולת כזו בתוסף.

I could be wrong but I’d say in most cases users hiding text for malicious reasons is a rare occurrence and the warning serves as a caveat of ‘what could happen’.

If this is something that you are worried about you could create a Feature request or use watched words to catch people typing [colour][/color] for example.

לייק 1

הרעיון של המילה הנצפית הוא רעיון טוב.

לייק 1

בעדכון האחרון נתקלתי בבעיה זו עם BBCode

בעת עריכת נושא ישן
"לא עובד תג BBCode עבור תג: span, מאפיינים: [[“style”,“color:#d71d1d”]]”

This is happening because it’s defaulting to the new editor: Choosing the default composer mode for your community, which does not support this kind of content yet.

You can close this message and switch to the Markdown editor via the toggle at the left of the toolbar, or by hitting CTRL M , and things should work as usual.