Bug #65393

RTE wraps paragraphs in DIV tags in Chrome upon save

Added by Mario Rimann over 6 years ago. Updated over 5 years ago.

Status:
Rejected
Priority:
Should have
Assignee:
-
Category:
RTE (rtehtmlarea + ckeditor)
Target version:
-
Start date:
2015-02-27
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

Hi

I'm adding three lines of text in an empty RTE (entering by hand, no copy-pasting):

foo
bar
baz

When I switch to the HTML-view within RTE before saving the content element, I see the following:

<p>foo</p><p>bar</p><p>baz</p>

Which I think is OK

When I then save the content element and again have a look at the HTML-view within the RTE, it shows this:

<p>foo</p>
<p>bar</p>
<p>baz</p>

Still everything OK, outcome as expected.

But when I copy-paste the same three lines from Notepad++ as pure Text (no styling) to the empty RTE I see the following text:

foo
bar
baz

Switching to the HTML-view within the RTE shows:

<div>foo</div><div>bar</div><div>baz</div>

And finally saving the CE results in the following HTML-view:

<div><p>foo</p></div>
<div><p>bar</p></div>
<div><p>baz</p></div>

I first thought, it could be depending on the line-endings configured/used in Notepad++ at first (it was CR/LF), but switching from Windows to Unix-Line-Endings in the text-editor (LF only) didn't solve the issue!

So what I see is that the RTE in Chrome behaves differently, depending on whether someone enters text into the RTE directly or copy-pastes the "same" content from another editor.

Strange thing is, that the same procedure as outlined above works in Firefox! Difference in Firefox is, that the copy-pasted text is interpreted as

<p>foo<br />bar<br />baz</p>

Which well, is not exactly identical to entering the text instead of copy-pasting - but it didn't matter so far for our customers. But as they start using Chrome more and more, the above mentioned issue would be nice to get fixed.

Tested on TYPO3 CMS v6.2.9


Files

19-03-2015 08-58-34.png (21.7 KB) 19-03-2015 08-58-34.png Mario Rimann, 2015-03-19 09:00
#1

Updated by Mario Rimann over 6 years ago

Chrome Version 40.0.2214.115
Firefox Version 35.0.1

The same also happens with TYPO3 CMS 6.2.10

#2

Updated by Stanislas Rolland over 6 years ago

When copy-pasting, what paste behaviour are you using in user settings?

#3

Updated by Mario Rimann over 6 years ago

See the attached user settings regarding the RTE - there's nothing configured IMO (e.g. using default settings).

#4

Updated by Alexander Kontos over 6 years ago

Hi,

i can confirm that but unfortunately the behaviour comes from the HTMLArea itself.
Please go to
http://htmlarea.sourceforge.net/examples/core.html

Sorry we can't do anything here. Maybe you could try to get in contact with the programmer of the HTMLArea

#5

Updated by Mathias Schreiber over 6 years ago

  • Status changed from New to Rejected
#6

Updated by Wolfgang Hamster over 5 years ago

Hello,
is there already a solution?
This problem occurs more often...

Also available in: Atom PDF