ck_editor: Linefeeds added after each save
I already made the experience in TYPO3 7.6.x and now it is also happening in TYPO 8.7.2:
Whenever I save Text in ck_editor an additional line feed <p> </p> is added after
each line. Also is every "<br />"-tag converted into a "<p></p>"-wrapper around the line.
In order to prevent this behaviour I added the following directive to my page tsconfig:
dontConvBRtoParagraph = 1
preserveTables = 1
typolist = 0
which has no effect at all.
I am not in the mood nor do I have the time fiddling around with dozens of possible
ts-optioons and trying to find a solution by trial-and-error. This is so basic - there
should be a straightforward solution (which I did not find so far).
#4 Updated by Jasmina Ließmann about 2 years ago
I can confirm the problem, but only for my special case. I have several custom elements (new CTypes) that can contain IRRE elements. The IRRE element itself has a text field, which should contain an RTE only on a particular CType.
By using a configuration like this, I get duplicate p-tags each time I save the particular CType.
$GLOBALS['TCA']['tt_content']['types']['ce_custom'] = [ 'columnsOverrides' => [ 'tx_domain_model_records' => [ 'config' => [ 'overrideChildTca' => [ 'columns' => [ 'text' => [ 'config' => [ 'enableRichtext' => true, 'richtextConfiguration' => 'default', ], ], ], ], ], ], ], ],
If I activate the RTE for the text field of the IRRE element in general (and not just for the specific CType), the problem does not occur.Tested with:
- TYPO3 CMS 8.7.5-dev
- rte_ckeditor (8.7.5)
- fluid_styled_content (8.7.5)
I don't use Flux or DCE. In normal content elements like 'text' or 'textmedia' the problem does not occur as well.
#8 Updated by Ralf Zimmermann about 2 years ago
I use the columnsOverrides and overrideChildTca TCA feature to enable the RTE on the "description" field of a sys_file_reference.
\TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule( $GLOBALS['TCA']['tt_content'], [ 'types' => [ 'textmedia' => [ 'columnsOverrides' => [ 'assets' => [ 'config' => [ 'overrideChildTca' => [ 'columns' => [ 'description' => [ 'config' => [ 'enableRichtext' => true, 'richtextConfiguration' => 'default' ], ], ], ], ], ], ], ], ], ] );
When saving, the DataHandler does not know what was overwritten by the parent element:
The DataHandler takes the "default" configuration of "$GLOBALS['TCA']['sys_file_reference']['types']['columnsOverrides']['description']['config']" and ignores the "overrideChildTca" configuration from the parent element.
Therefore, "'enableRichtext' => true" is not set and the DataHandler does not execute the required RTE transformations.
#11 Updated by Riccardo De Contardi 6 months ago
Is this still an issue? I tried to use
- TYPO3 9.5.5
- Ext:news 7.1.0
I followed the following steps:
1) create a sysfolder
2) create a news record
3) tab "content elements" > create a "text" content element
4) write some text in it
So far, I've not experienced that each save adds a line. Is a different test required?