Watch/replace with bbCode?

AI-generated summary

In a support thread titled “Watch/replace with bbCode?”, Jagster seeks clarification on using BBCode within Discourse’s watched words feature. They observe that while BBCode like <kbd>[wrap=icon id=fa-share][/wrap]&nbsp;Reply</kbd> renders correctly when used directly in posts, it appears as plain text when applied via watched word replacements — even with HTML enabled and SVG icons configured. Jagster consults an AI assistant, which confirms that Discourse does support a subset of BBCode tags (e.g., [b], [i], [u], [color=]) in watched word replacements, though advanced or custom formatting may require plugins. The AI references official documentation on Formatting posts using markdown, BBCode, and HTML and Discourse BBCode. Despite this, Jagster remains uncertain whether the AI’s answer fully resolves their issue but opts to mark it as a solution to close the topic for cleanup. The core confusion centers on why BBCode works in posts but not in watched word replacements — a discrepancy not fully explained by the AI’s general guidance.

Continuing the discussion from How do I prevent unicode heart from become :heart: when posting?:

I don’t get that watched word thing

If I’m watching reply-button and replacing it with <kbd>[wrap=icon id=fa-share][/wrap]&nbsp;Reply</kbd> I get a button, but everything else is in text form like this:

[wrap=icon id=fa-share][/wrap]&nbsp;Reply

HTML is checked and it doesn’t care if I have or haven’t fa-share in svg sub list.

But if I use it directly in a post it works, as here:  Reply

What don’t I get now?

I asked AI and it says I can’t do that. True or hallucinations?

Using BBCode in Discourse Watched Words AI

Jagster:

I’m using watched words to replace some terms. Can I use bbCode in replacing content?

DiscourseHelper:

Searching

Searching for: Can bbCode be used in watched words replacement content terms? Discourse features options support limitations

Reading

Read: Formatting posts using markdown, BBCode, and HTML

In Discourse, when using watched words to replace terms, you can indeed use BBCode in the replacement content. However, only a subset of common BBCode tags is supported. The supported tags include basic text formatting like [b]strong[/b], [i]emphasis[/i], [u]underlined[/u], [s]strikethrough[/s], and certain other tags for images, URLs, and quotes.

Here is a basic example of using BBCode:

  • Bold text: [b]This is bold[/b]
  • Italic text: [i]This is italic[/i]
  • Underlined text: [u]This is underlined[/u]

For more specific styling like color changes, BBCode also includes [color=red]Red text[/color], but support for color may require additional plugins or adjustments, as described in this topic on Discourse BBCode.

Lastly, if you’re looking to add custom BBCode or have more complex formatting requirements, further customization or use of plugins might be necessary.

For more details on supported BBCode in Discourse, you can review the comprehensive list in the Discourse Formatting Guide.

I guess it was true, so I mark that as an solution to close this topic to clean up places a bit. Still I don’t know for sure.