# Generic bbcode wrapper for theme components

**URL:** <https://meta.discourse.org/t/generic-bbcode-wrapper-for-theme-components/123516>\
**Category:** Announcements\
**Tags:** new-feature\
**Created:** [July 20, 2019, 12:48pm UTC](https://meta.discourse.org/t/generic-bbcode-wrapper-for-theme-components/123516 "2019-07-20T12:48:59Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [February 14, 2022, 1:07am UTC](https://meta.discourse.org/t/generic-bbcode-wrapper-for-theme-components/123516/8 "2022-02-14T01:07:55Z")

</div>

Recently we expanded this to support generic components using:

````plaintext
```customblock param=1
```

````

This will be translated to:

```plaintext
<pre data-code-param="1" data-code-wrap="customblock"><code class="lang-nohighlight"></code></pre>

```

Thus as a component you can use `data-code-wrap` to determine special handling and syntax highlighting is disabled.

We used this pattern here:

[https://github.com/discourse/discourse-mermaid-theme-component](https://github.com/discourse/discourse-mermaid-theme-component)

Which is an official mermaid theme component.

---

_[View the full topic](https://meta.discourse.org/t/generic-bbcode-wrapper-for-theme-components/123516)._
