Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

flux:field.text + CKEditor add new empty <p></p> in backend every save action

When i use my custom FLUX CE with flux.filed.text, every time when i save my text i get new empry line <p></p> after aech paragraph.Add empty line between paragraphs like <p><br></p>

In default flud_styled_content like TextMedia, Text, TextPic - all fine. Just lags this

<flux:field.text name="text" label="Text" 
                 enableRichText="TRUE"/>

I tried:

  1. swich off autoParagraph Turn off enclosing <p> tags in CKEditor 3.0
  2. Reload configuration and create custom also tried different Default, Minimal, Custom, etc. https://github.com/FluidTYPO3/flux/issues/1388#issuecomment-311618318

I found how clean them in frontend - i just added in output

 <f:format.html parseFuncTSPath="">{text}</f:format.html>

But I dont like when every element saving i get more and more epty lines

TYPO3 8.7.1 + FLUX 8.2.1

like image 898
Oleg V Karun Avatar asked Oct 17 '22 10:10

Oleg V Karun


1 Answers

Didnt find other solution s as add conditions direct in 'flux' about line 60 in flux/Classes/Form/Field/Text.php

if (true === $this->getEnableRichText() && true === empty($defaultExtras)) {
    $typoScript = $this->getConfigurationService()->getAllTypoScript();
    //$configuration['defaultExtras'] = $typoScript['plugin']['tx_flux']['settings']['flexform']['rteDefaults'];
    $configuration['enableRichtext'] = true;
} else {
    $configuration['defaultExtras'] = $defaultExtras;
}

Hope TYPO3 will fix this soon in core or 'flux' will add official pach

like image 52
Oleg V Karun Avatar answered Oct 21 '22 06:10

Oleg V Karun