Opened 9 years ago

Closed 9 years ago

#12943 closed Bug (duplicate)

Problem paste(CTL+V) in chrome

Reported by: Kogata Owned by:
Priority: Normal Milestone:
Component: Core : Pasting Version: 4.5.0 Beta
Keywords: Cc:

Description

When paste(CTL+V) in chrome, all of text element is add <span style="font-weight: normal;">XXXX</span> cause:

plugins/clipboard/plugin.js L781

var selPastebin = range.select();

// If non-native paste is executed, IE will open security alert and blur editable.
// Editable will then lock selection inside itself and after accepting security alert
// this selection will be restored. We overwrite stored selection, so it's restored
// in pastebin. (#9552)
if ( CKEDITOR.env.ie ) {
blurListener = editable.once( 'blur', function() {
editor.lockSelection( selPastebin );
} );
}

next code is fixed.

// If non-native paste is executed, IE will open security alert and blur editable.
// Editable will then lock selection inside itself and after accepting security alert
// this selection will be restored. We overwrite stored selection, so it's restored
// in pastebin. (#9552)
if ( CKEDITOR.env.ie ) {
var selPastebin = range.select();
blurListener = editable.once( 'blur', function() {
editor.lockSelection( selPastebin );
} );
}

Change History (2)

comment:1 Changed 9 years ago by Piotrek Koszuliński

As I understand the fix you're proposing, you want to use the pastebin only on IE. This can't be done - we have to use the pastebin on every browser because it allows us to filter the pasted content.

In CKEditor 4.5 we are switching to retrieving data straight from the clipboard, without the pastebin. So the code will change, but the problem with Chrome pasting lots of crappy HTML (like that span{font-weight}) will remain. For this we have two solutions: the Advanced Content Filter and new paste filter.

comment:2 Changed 9 years ago by Jakub Ś

Resolution: duplicate
Status: newclosed

Taking above comment into account I close this issue as DUP of #11621.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy