Bug #79216

rte_ckeditor generates empty lines between paragraphs

Added by Jan Kiesewetter over 2 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
RTE (rtehtmlarea + ckeditor)
Target version:
-
Start date:
2017-01-09
Due date:
% Done:

0%

TYPO3 Version:
8
PHP Version:
7.0
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

rte_ckeditor generates empty lines between paragraphs and headlines.
These empty lines are rendered as

<p>&nbsp;</p>

in frontend with fluid_styled_content (not tested with css_styled_content, yet).


Related issues

Related to TYPO3 Core - Bug #80778: CKeditor inserts empty paragraphs in FlexForms New 2017-04-09
Related to TYPO3 Core - Bug #81893: ck_editor: Linefeeds added after each save New 2017-07-17
Duplicated by TYPO3 Core - Bug #79351: ckeditor adds empty paragraph on every content Closed 2017-01-17

History

#1 Updated by Philipp Faber over 2 years ago

Hey,
try to change the rendering from <format.html> to <format.raw> in fluid styled content. That should do the trick.

#2 Updated by Jan Kiesewetter over 2 years ago

I don't think so, because i don't use a variable:

lib.content = CONTENT
lib.content {
  table = tt_content
  select {
    orderBy = sorting
    where.field = colPos
    where.intval = 1
    where.wrap = colPos=|
    languageField = sys_language_uid
  }
}

and
<f:cObject typoscriptObjectPath="lib.content"/>

#3 Updated by Jan Kiesewetter over 2 years ago

This also happens with a simple

page.10 < styles.content.get

Or do you mean inside fluid_styled_content?

#4 Updated by Jan Kiesewetter over 2 years ago

OK, I should read you whole answer before I reply.

Changing every fluid_styled_content template just because of rte_ckeditor is, well, ...
I go with rtehtmlarea for now.

How would you implement a core patch? A snd template root path for fluid_styled_content if rte_ckeditor is loaded?

#5 Updated by Jan Kiesewetter over 2 years ago

But I think, format.raw is not a good solution at all!

#7 Updated by Christian Kuhn over 2 years ago

yes, that's only one restriction of the ckeditor configuration delivered with v8.5. basically, no content transformation was ever applied. this is partially fixed in master already, and benni is currently working on a better configuration system of the editor.

#8 Updated by Anders Kostending about 2 years ago

  • Status changed from New to Closed

Christian Kuhn wrote:

yes, that's only one restriction of the ckeditor configuration delivered with v8.5. basically, no content transformation was ever applied. this is partially fixed in master already, and benni is currently working on a better configuration system of the editor.

It appears that this one is solved with https://forge.typo3.org/issues/79351. I believe that was with the new configuration system?

#9 Updated by Harald Krischner about 2 years ago

Why is this issue closed? #79351 is closed as related to this one. And this seems to be closed because #79351 is resolved?

Anyway, I still have this problem and have not found any leverage to get rid of the continuously growing number of empty paragraphs on every save.

I am using a custom content element with this fairly straight forward configuration:

    <f:section name="Configuration">
        <flux:form id="tabs"  options="{group: 'my-elements'}">
            <flux:form.section name="tabs" label="Tab">
                <flux:form.object name="tab">
                    <flux:field.input name="title" label="title"/>
                    <flux:field.text name="content" label="text" enableRichText="true"/>
                </flux:form.object>
            </flux:form.section>
        </flux:form>
    </f:section>

#10 Updated by Rafal Brzeski about 2 years ago

Guys, this works for me very well

<f:format.html parseFuncTSPath="">

The only downside is that you have to change it in the FSC files.
And the question, is this solution safe ?

#11 Updated by Steffen Kamper almost 2 years ago

the solutions are no sulutions - the problem starts in BE when you edit a text with paragraphs. For me, after each save, empty paragraphs are added between each existing paragraph.
So the problem must be solved at this place, and not supressing this error in FE rendering!

#12 Updated by Steffen Kamper almost 2 years ago

OK - i tried with different types of text, and the problem is inside flux

Using defaultExtras in text configuration leads to the problem. Solution is not to use defaultExtras, but enableRichtext = true instead.

So i will do a change request for FLUX , and for core the issue does not exist (as long as you do not change the TCA for mode)

For me the ticket can be closed.

#13 Updated by Christian Kuhn almost 2 years ago

  • Related to Bug #80778: CKeditor inserts empty paragraphs in FlexForms added

#14 Updated by Oleg Karun almost 2 years ago

Stephen Kamper thx i also added hard coded as you told. Approximately in 60 line in
typo3conf/ext/flux/Classes/Form/Field/Text.php

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

#15 Updated by Jasmina Ließmann almost 2 years ago

  • Related to Bug #81893: ck_editor: Linefeeds added after each save added

Also available in: Atom PDF