Closed akiessling closed 2 years ago
Hi @akiessling, you can only select existing fields that match with the current field type. TYPO3 bodytext is the only core RTE field. So everything is correct :)
Hi @nhovratov,
well, it only becomes an RTE with columnsOverrides.
The default config is like this
'bodytext' => [
'l10n_mode' => 'prefixLangTitle',
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.text',
'config' => [
'type' => 'text',
'cols' => 80,
'rows' => 15,
'softref' => 'typolink_tag,email[subst],url',
'search' => [
'andWhere' => '{#CType}=\'text\' OR {#CType}=\'textpic\' OR {#CType}=\'textmedia\''
]
]
],
The field is used in different CTypes, for RTE
'columnsOverrides' => [
'bodytext' => [
'config' => [
'enableRichtext' => true,
]
]
]
for tables
'columnsOverrides' => [
'bodytext' => [
'config' => [
'renderType' => 'textTable',
'wrap' => 'off',
],
],
],
So IMHO it should show as a target for a textarea, so you won't loose data when switching between similar CTypes
@akiessling Yes, you are absolutely right regarding columnsOverrides. But it's kinda awkward to have a field, which can be both text and RTE. Mask is adding this line for bodytext fields:
$GLOBALS['TCA']['tt_content']['types'][$cTypeKey]['columnsOverrides']['bodytext']['config']['enableRichtext'] = 1;
.
This means bodytext will always be a RTE field. We can't remove this or else other installations will break.
I can put this to the feature list though. It is certainly possible, but not with backwards compatibility.
I'd consider the hardcoded bodytext setting as a bug itself, since it is also set, even if the bodytext field is not in use.
Okay, this is another story. Can be cleaned up together with the feature as its not hurting anyone.
Fixed both, the bodytext field being now selectable as text and richtext, and the hard coded enableRichtext=1 for all elements, even without bodytext field now checks, if the bodytext field is used. Fully backwards compatible!
Awesome :) Thank you for taking care!
When i add an RTE field, i get the selector to use the existing bodytext field. When adding a textarea, i don't get that option, but can select other text fields from tt_content. Shouldn't bodytext also show up here?
mask version 7.0.0 TYPO3 version 10.4.16