AfterTransformTextForRichTextEditorEvent
New in version 13.3
The events BeforeTransformTextForPersistenceEvent,
AfterTransformTextForPersistenceEvent,
BeforeTransformTextForRichTextEditorEvent
AfterTransformTextForRichTextEditorEvent were introduced as
replacement for the removed hook
$GLOBALS
.
Modify data when retrieving content from the database and pass to the rich-text-editor (RTE). As opposed to BeforeTransformTextForRichTextEditorEvent this event is executed after TYPO3 applied any kind of internal transformations like for links.
When using a RTE HTML content element, two transformations take place within the TYPO3 backend:
- From database: Fetching the current content from the database (`persistence`) and preparing it to be displayed inside the RTE HTML component.
- To database: Retrieving the data returned by the RTE and preparing it to be persisted into the database.
This event can modify the first part. This allows developers to apply more customized transformations, apart from the internal and API ones.
Event listeners can use $value = $event->get
to get the
current contents, apply changes to $value
and then store the
manipulated data via $event->set
,
see example: Example: Transform a text before saving to database.