---
title: "Feature: #81901 - Extend T3editor"
manual: "TYPO3 Core Changelog"
version: "main"
permalink: "https://docs.typo3.org/permalink/changelog:feature-81901"
source: "Changelog/9.0/Feature-81901-ExtendT3editor.rst"
typo3-version: "9.0"
typo3-major: 9
type: "feature"
issue: 81901
forge: "https://forge.typo3.org/issues/81901"
tags: ["Backend", "ext:t3editor"]
rendered: "2026-09-17T21:17:42+00:00"
---

# Feature: #81901 - Extend T3editor {#feature-81901-extend-t3editor}

See [forge#81901](https://forge.typo3.org/issues/81901)

## Description {#description}

Since the refactoring of the system extension `t3editor`, custom modes (used for syntax highlighting) and addons can be registered now.

### Prerequisites {#prerequisites}

To do this, extensions may have now these two files to feed T3editor:

-   `Configuration/Backend/T3editor/Addons.php`
-   `Configuration/Backend/T3editor/Modes.php`

Both files return an array, as known as in TCA and Backend Routes, for example.

### Register an addon {#register-an-addon}

To register an addon, the following code may be used:

```php
'my/addon' => [
    'module' => 'cm/addon/my/addon',
    'cssFiles' => [
        'EXT:my_extension/Resources/Public/Css/MyAddon.css',
    ],
    'options' [
        'foobar' => 'baz',
    ],
    'modes' => ['htmlmixed', 'xml'],
],
```

| Key | Type | Description |
| --- | --- | --- |
| \<identifier> | string | Represents the unique identifier of the module (`my/addon` in this example) |
| module | string | Mandatory: Holds the RequireJS namespace of the CodeMirror module. For custom modules placed in an extension, the known `TYPO3/CMS/Extension/Module` namespace must be used |
| cssFiles | array | Holds all CSS files that must be loaded for the module |
| options | array | Options that are used by the addon |
| modes | array | "Jails" the addon to specific modes. This means, the module is only loaded if any of the given modes is used |

### Register a mode {#register-a-mode}

To register a mode, the following code may be used:

```php
'css' => [
    'module' => 'cm/mode/css/css',
    'extensions' => ['css'],
],
```

| Key | Type | Description |
| --- | --- | --- |
| \<identifier> | string | Represents the unique identifier and format code of the mode (`css` in this example). The format code is used in TCA to define the CodeMirror mode to be used |
| module | string | Mandatory: Holds the RequireJS namespace of the CodeMirror mode. For custom modules placed in an extension, the known `TYPO3/CMS/Extension/Mode` namespace must be used |
| extensions | array | Binds the mode to specific file extension. This is important for using T3editor in the Filelist module. |
| default | bool | If set, the mode is used as fallback if no sufficient mode is available. By factory default, the default mode is `html` |

CodeMirror delivers a lot more modes and addons than registered in T3editor by default.
More supported addons and modes are available at:

-   [https://github.com/codemirror/CodeMirror/tree/5.27.4/addon](https://github.com/codemirror/CodeMirror/tree/5.27.4/addon)
-   [https://github.com/codemirror/CodeMirror/tree/5.27.4/mode](https://github.com/codemirror/CodeMirror/tree/5.27.4/mode)

## Impact {#impact}

After clearing the system caches of TYPO3, T3editor checks every extension for the files `Configuration/Backend/T3editor/Addons.php`
and `Configuration/Backend/T3editor/Modes.php`. The complete configuration of both is built and stored in the cache
afterwards.

## Affected Installations {#affected-installations}

All installations are affected.
