Project

General

Profile

Actions

Bug #65393

closed

RTE wraps paragraphs in DIV tags in Chrome upon save

Added by Mario Rimann over 9 years ago. Updated over 8 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
Actions

Also available in: Atom PDF