Processing rule for transforming a code blocks represented in HTML to [code]Text[/code] in BBCode. The rule expects the representation of code blocks as it is the default for the CKEditor 5 Code Block plugin, thus, a structure like this:

<pre><code class="language-plaintext">TEXT</code></pre>
<pre><code class="language-css">CSS</code></pre>

Implements

Constructors

Properties

Methods

Constructors

Properties

config: Required<BBCodeCodeConfig>
id: "code" = "code"

Some ID solely used for debugging purpose. Recommended to keep unique among rules, though.

tags: string[] = ...

BBCode tags, this rule is related to. Automatically also registers tags as known to BBCode to HTML processing.

Typically, you list tags here, which are generated during toData mapping.

Methods