#8908 closed Bug (invalid)
Content pasted using 'Paste as Plain text' is sometimes styled in the editor.
Reported by: | Teresa Monahan | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | Core : Pasting | Version: | 3.5 |
Keywords: | IBM | Cc: | Damian, Satya Minnekanti |
Description
To reproduce:
- Open the replacebyclass sample and place the cursor between the words 'sample' and 'text'. Note that these words have a bold styling applied.
- Open the 'Paste as plain text' dialog and type some content.
- Click Ok.
Problem: The content that is inserted through the 'Paste as plain text' dialog also has the bold styling applied. It should not have any styling.
This occurs in CKEditor since 3.5. In rev 6232 the text is correctly inserted with no styling. However from rev 6241 the pasted content has styling applied.
Change History (5)
comment:1 Changed 12 years ago by
Status: | new → confirmed |
---|---|
Version: | 3.6.4 (SVN - trunk) → 3.5 |
comment:2 follow-up: 4 Changed 12 years ago by
Component: | General → Core : Pasting |
---|---|
Resolution: | → invalid |
Status: | confirmed → closed |
This is by design.
Our assumption is that Paste as Plain Text doesn't bring any style from the source, being contextual on the target. This reflects the "Keep text only" or "Paste as Unformatted Text" feature in MS Word.
comment:3 Changed 12 years ago by
Contextual pasting does seem to be the standard across other applications so we are ok with closing this. It is a big change from the editor's previous behavior though.
Having said that, we agree with http://dev.ckeditor.com/ticket/8908#comment:1. Rather than producing:
<strong>sa</strong><strong>test</strong><strong>mple text</strong>
the editor should produce:
<strong>satestmple text</strong>
for this type of content. Can you please reopen this ticket to address this?
comment:4 Changed 12 years ago by
Replying to fredck:
This is by design.
Our assumption is that Paste as Plain Text doesn't bring any style from the source, being contextual on the target. This reflects the "Keep text only" or "Paste as Unformatted Text" feature in MS Word.
Contextual pasting does seem to be the standard across other applications so we are ok with closing this. It is a big change from the editor's previous behavior though.
Having said that, we agree with http://dev.ckeditor.com/ticket/8908#comment:1. Rather than producing:
<strong>sa</strong><strong>test</strong><strong>mple text</strong>
the editor should produce:
<strong>satestmple text</strong>
for this type of content. Can you please reopen this ticket to address this?
comment:5 Changed 12 years ago by
The elements merging is a different issue and I would ask you to please open a dedicated ticket for it. Thanks!
Having in ming of what was written in https://dev.ckeditor.com/ticket/7796#comment:4
I thought that text is simply inserted into <strong> tags and thus it's getting bold but it turned out that new text splits existing <strong> tag and is wrapped in new one producing:
The above is definitely wrong. The result should be either:
or (It was working that way till CKEditor 3.4.3)
First concept is ok with contextual pasting while second was used in older versions of CKE.