Opened 13 years ago
Last modified 12 years ago
#10328 closed Bug
Inconsistency in paste as plain text — at Initial Version
| Reported by: | Perttu Myry | Owned by: | |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | Core : Pasting | Version: | 4.0 Beta |
| Keywords: | Webkit | Cc: |
Description
Pasting seems to work bit differently when using ctrl + v and forcePasteAsPlainText option in comparison to using paste as plain text plugin when enter mode is set to div. Via paste as plain text plugin I got correct looking HTML with divs and br elements, but when pasting via ctrl + v I got just br elements as line breaks.
Here is the plain text content that I copy-pasted.
#1 first #2 second #3 third
And here's how the source looked after pasting using ctrl + v.
<div> <br /> #1 first<br /> #2 second<br /> #3 third<br /> </div>
I also checked out the event in editor.on('paste') handler and event.data.dataValue looked like this when pasting using ctrl + v.
<br>#1 first<br>#2 second<br>#3 third<br>
Whereas the event.data.dataValue looked like this when using paste as plain text plugin.
<div>#1 first</div><div>#2 second<br>#3 third</div>
Is this a bug or do these two different "paste as plain text" methods work differently by definition?
