#106636RTE with default value
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