Support BBCode/KaTeX or MathJax/HTML rendering in [details=...] titles when relevant plugins are installed

I’m using both the Discourse Math and Discourse BBCode plugins on my instance. I’d like to request support for rendering inline BBCode and KaTeX (if using \color) or MathJax (if using \textcolor) (via $...$) inside [details=...] titles.

Currently, all formatting inside [details=...] titles is stripped or shown as literal text — even though the content body renders math and BBCode beautifully. This limits visual clarity when building math-heavy or educational posts where you’d want the collapsed title to reflect the structure clearly (e.g., “the \hat{r} component” or “$\textcolor{blue}{3^\text{rd}}$ term”).

If supported, the following use cases would become possible:

[details="[color=orange]1st Term[/color]"]
...
[/details]
[details="$\textcolor{green}{\text{Vector Potential Term}}$"]
...
[/details]

This would allow, for example:

  • Color-coded component names
  • Unicode or LaTeX-encoded math symbols in section headers
  • More accessible and well-structured math discussions (especially for students and researchers)

This feature could be gated behind detecting whether discourse-math or discourse-bbcode is enabled, so it doesn’t affect default Discourse behavior.

Would this be feasible as a core improvement or plugin extension?

Thanks for your amazing work on Discourse — it’s an exceptional platform for technical and academic communication.

Exploring colouring using BBcode

no KaTex in this post


[color=blue]i get reminders often about brining cushions in but not plants[/color]

[color=blue]i get reminders often about brining cushions in but not plants[/color]

[details= [color=blue]i get reminders often about brining cushions in but not plants[/color]]
so i should improve the available reminders to ensure someone does water the plants
[/details]
[color=blue]i get reminders often about brining cushions in but not plants[/color]

so i should improve the available reminders to ensure someone does water the plants


In a forum with discourse BBcode enabled, the output is

Just checking in to see if there’s any movement on this.

This would still be extremely helpful for any Discourse site that uses math, especially for educational, academic, or scientific communities.

Currently, [details="..."] titles strip or ignore all BBCode and KaTeX/MathJax, even with the official plugins installed and working in the body.

Example broken cases:

  • [details="Color: [color=blue]important[/color]"] → renders as plain [color=blue]important[/color]
  • [details="$\vec{v}$-based solution"] → renders as plain $...$ text

There’s no workaround as far as I can tell. Even using raw HTML <details><summary> doesn’t help, and attempts to apply raw="true" fail due to summary tags being sanitized early.

Would love to see this supported — even conditionally when the relevant plugin is active.

Happy to test or help spec this if needed.