Opened 14 years ago
Closed 14 years ago
#5751 closed Bug (invalid)
Paste As Plain Text does not behave consistently
Reported by: | Gaurang | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | Core : Pasting | Version: | 3.2.1 |
Keywords: | Cc: | gaurang.d.patel@… |
Description
config.forcePasteAsPlainText is set to true and enterMode is CKEDITOR.ENTER_P
Following are 2 cases considered to generate this problem.
Case 1:
hello world <p>some paragraph</p>
When i copy it from browser and paste it into the CKEditor area it correctly convert that to
<p> hello world</p> <p> some paragraph</p>
Case 2:
<p>some paragraph</p> hello world
When i copy it from browser and paste it into the CKEditor area it will get converted to
<p> some paragraph<br /> hello world</p>
it add line break instead of adding paragraph. which is not as expected.
in both of the cases it should generate paragraphs for linebreaks.
Steps to Regenerate:
- Copy case 1 text from testData.html file attached and paste as plain text to CKEditor content area. It will generate out put as expected.
- Copy case 2 text from testData.html file and paste as plain text to CKEditor content area. It will generate a line break (br) instead of paragraph.
Attachments (1)
Change History (6)
Changed 14 years ago by
Attachment: | testData.html added |
---|
comment:1 Changed 14 years ago by
Cc: | gaurang.d.patel@… added |
---|
comment:2 follow-up: 3 Changed 14 years ago by
Keywords: | Pending added; forcePasteAsPlainText enterMode removed |
---|
I have exactly the same result as expected with Ctrl-V or 'Paste as plain text' button, can you provide more details?
comment:3 Changed 14 years ago by
Replying to garry.yao:
I have exactly the same result as expected with Ctrl-V or 'Paste as plain text' button, can you provide more details?
The difference is not when you choose Ctrl-V or 'Paste as plain text' button. the difference is while you choose two different test case.
I already attached testData.html which has 2 Html case that can be copied. the detail is already there in bug description.
comment:4 Changed 14 years ago by
Keywords: | Pending removed |
---|
comment:5 Changed 14 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
By pasting into a textarea we're able to see that browser has produced one more line break in the second case, so you see that opening and closing paragraph are different, we're consistently following the this behavior by having these rules:
- <br /> per line-breaks;
- <p> for two consequent line-breaks;
Test Data File