Issue Task Resolved

#111159Add a stoppable PSR-14 event for f:render.text

Matthias Vogel 10/20/26, 11:10 updated 10/21/26, 19:15

Description

The f:render.text ViewHelper currently provides no event for replacing its rendering. Extensions such as the Visual Editor therefore need to override the ViewHelper and duplicate Core logic.

Introduce TYPO3\CMS\Fluid\Event\RenderTextEvent, dispatched after resolving and validating the record, field schema, and string value, before escaping or rich-text processing.

The event should expose:
- The resolved record, database table, and full record type.
- The field name and field schema.
- The original string value.
- The optional request.
Listeners can supply a complete UnsafeHTML result through setRenderedText(). The result is returned unchanged, preserving custom result objects and their metadata.

The event implements StoppableEventInterface: supplying a result stops subsequent listeners and skips default rendering. An empty HTML result also counts as handled.

Without a replacement, existing rendering remains unchanged. Missing optional fields still return null, and invalid inputs retain their existing exception behavior.

This allows the Visual Editor to integrate through an event listener without overriding the Core ViewHelper.

Reviews 2

History 110

  1. Matthias Vogel commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2026-10-21T19:15:18+00:00" > 10/21/26, 19:15 </span>

    Applied in changeset commit:c4c77b05ebe2ff4697f6c3b0276cc9a552aa572a.