Bug #18981

<p></p> instead of <p>&nbsp;</p> within tables

Added by Raffi about 5 years ago. Updated about 1 month ago.

Status:Needs Feedback Start date:2008-06-18
Priority:Should have Due date:
Assignee:- % Done:

0%

Category:-
Target version:-
TYPO3 Version:4.1 Complexity:
PHP Version:
Votes: 0

Description

When I create empty paragraphs in a RTE table, the generated code in the background is "<p></p>", while an empty paragraph outside a table generates the code "<p> </p>".
The problem is that the empty paragraphs in the table are not displayed in the rich text editor since there is no nbsp;.
The correct state would be that the code "<p> </p>" is also generated for empty paragraphs inside a table.

(issue imported from #M8752)

History

Updated by Raffi about 5 years ago

Here comes the generated code again:

Generated code outside table (as it is correct)
< p > &nbsp < / p >

Generated code inside table:
< p > < / p >

Updated by Ralf Hettinger almost 5 years ago

Related to #6642 , which kind of confirms this error.

Updated by Raffi almost 5 years ago

Bug 0006642 is listed as "resolved", but the problem exists here with TYPO3 version 4.2 and rtehtmlarea 1.7.4. so it seems that the issue is still unresolved.

Updated by Ralf Hettinger almost 5 years ago

You're right, #6642 is marked as solved; it seems that Stanislas has adopted the provided solution.

As mentioned there, the solution can't solve the issue for p-tags within table cells - so that's why I was pointing to it. Unfortunately without being able to give a better suggestion.

Updated by Jonas Felix almost 5 years ago

Funny bug, but the missing nbsp; is realy leading to a htmlarea block.

Updated by Ralf Hettinger almost 5 years ago

I remember having spent quite some time digging into this, but wasn't able to find the reason for p-tags without innerhtml not being editable (maybe even this idea is misleading).
If you're reading Stanislas and have more insight for this behaviour, I'd be grateful to read about.

Updated by Jonas Felix almost 5 years ago

Isn't it possible to just add the  ?That would solve the problem.

Updated by Ralf Hettinger almost 5 years ago

What I'd think is that adding [AND]nbsp; is not more than a clever workaround. Applying it to table cells would mean the need to implement some post processing table parser; which would mean at least some extra effort as well.

Solving the original problem (why does htmlarea not show p-tags when no child node within?) seems to be the way to go for me rather than curing it's symptoms... but that's just my opinion.

Updated by Stanislas Rolland almost 5 years ago

This is a difficult issue because the browsers simply do not render empty paragraphs.

But, is it really a good practice to insert paragraphs inside table cells? Why not use RTE.default.buttons.table.disableEnterParagraphs?

Updated by Ralf Hettinger almost 5 years ago

I am with you on that point Stanislas - but not everybody else might be.
I can imagine that there are people that do want to insert more than one paragraph into one table cell and for this use case, having the possibility to insert p-tags into cells would be crucial.

However - do you actually know why browsers simply do not render empty paragraphs within htmlarea? From an outside view and theoretically spoken, it would be generally nice if there was no need to insert [AND]nbsp; into some content database just for an RTE to stay usable... this affects p-tags not within tables as well.

Updated by Alexander Opitz about 1 month ago

  • Status changed from New to Needs Feedback
  • Target version deleted (0)
  • TYPO3 Version set to 4.1

The issue is very old, does this issue exists in newer versions of TYPO3 CMS (4.5 or 6.1)?

Also available in: Atom PDF