Issue Task Closed

#106636RTE with default value

Cyril Janody 04/29/25, 13:00 updated 12/02/25, 14:21

Description

Hi guys,

It is currently possible to set a default value for input/text fields via the placeholder configuration.

As we needed the same functionality for the RTE, we implemented it and share it with you so that it can eventually be part of TYPO3.

TCA example:

        'rte_6' => [
            'label' => 'rte_6 with placeholder and null handling',
            'config' => [
                'type' => 'text',
                'default' => null,
                'enableRichtext' => true,
                'mode' => 'useOrOverridePlaceholder',
                'nullable' => true,
                'placeholder' => '<p>My placeholder text</p>',
            ],
        ],
Here are some steps to test it:
  • Install styleguide;
  • Create the page tree including TCA demo records;
  • Use the “List” module and select the page labeled “elements rte”;
  • Edit one of the “Form engine elements – rte”, search for the field “rte_6”. The placeholder ‘

    My placeholder text

    ‘ is used as default;
  • Check the box to override it;

Sincerely

Reviews 3

History 1029

Show 14 earlier messages
  1. Juliane Wundermann commented <span data-processor="relativetime" data-value="2025-05-05T21:13:40+00:00" > 05/05/25, 21:13 </span>

    We have tested the feature in the backend according to the description and were able to confirm the functionality. We have not tested the feature in the frontend

  2. Cyril Janody commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2025-06-30T19:15:09+00:00" > 06/30/25, 19:15 </span>

    Applied in changeset commit:0392ba11fc40d6306ba890e4a051f57274b860f5.