---
title: "FormatRichTextViewHelper"
manual: "Events2"
version: "main"
permalink: "https://docs.typo3.org/permalink/jweiland/events2:formatrichtextviewhelper@main"
source: "AdministratorManual/Templates/ViewHelpers/FormatRichTextViewHelper.rst"
rendered: "2026-11-23T08:41:16+00:00"
---

# FormatRichTextViewHelper {#formatrichtextviewhelper}

<!-- TODO: no Markdown rendering for "versionadded" -->

Renders the submitted value of a rich text element of the event form
(`properties.dbMapping.dataType: richText`) in the mails of the
finisher `EmailToReceiver` of EXT:form.

The value is sanitized with the same configuration as on saving, see
[Modify the allowed markup of the frontend rich text editor](https://docs.typo3.org/permalink/jweiland/events2:frontend-rich-text-editor-sanitizer-event@main). The table is taken from
`properties.dbMapping.table` (default:
`tx_events2_domain_model_event`), the column from
`properties.dbMapping.column` of the form element. So the moderator
sees the formatting which will be stored, without attributes of the
editor and without active content. Links with `t3://` are removed, as they
can not be resolved in a mail.

## Arguments of the FormatRichTextViewHelper {#formatrichtextviewhelper-arguments}

-   **`element`**

    The form element of the value, usually `{formValue.element}` of
    `<formvh:renderAllFormValues>`. Required.

-   **`value`**

    The submitted value, usually `{formValue.processedValue}`. Required.

-   **`format`**

    `html` (default) returns the sanitized HTML. `plaintext` returns plain
    text with line breaks for the text part of a mail. The plain text is
    not escaped, so do not use it in HTML.

## Example for the FormatRichTextViewHelper {#formatrichtextviewhelper-example}

**EXT:my_sitepackage/Resources/Private/FormFramework/Templates/Finishers/Email/EventModeration.html (excerpt)**

```html
{namespace e2=JWeiland\Events2\ViewHelpers}

<e2:formatRichText element="{formValue.element}"
                   value="{formValue.processedValue}"/>
```

**EXT:my_sitepackage/Resources/Private/FormFramework/Templates/Finishers/Email/EventModeration.txt (excerpt)**

```text
<e2:formatRichText element="{formValue.element}" value="{formValue.processedValue}" format="plaintext"/>
```
