AfterRichtextConfigurationPreparedEvent
New in version 14.0
The PSR-14 event
\TYPO3\
allows to modify the richtext configuration after it has been fetched and prepared.
Example: Enable debugging in the rich text editor
The following event listener enables debugging in the rich text editor:
EXT:my_extension/Classes/Configuration/EventListener/EnableDebugRichTextEditorEventListener.php
<?php
declare(strict_types=1);
namespace MyVendor\MyExtension\Configuration\EventListener;
use TYPO3\CMS\Core\Attribute\AsEventListener;
use TYPO3\CMS\Core\Configuration\Event\AfterRichtextConfigurationPreparedEvent;
final class EnableDebugRichTextEditorEventListener
{
#[AsEventListener('my-package/configuration/modify-richtext-configuration')]
public function __invoke(AfterRichtextConfigurationPreparedEvent $event): void
{
$config = $event->getConfiguration();
$config['editor']['config']['debug'] = true;
$event->setConfiguration($config);
}
}