Ticket #5144: 5144.patch
File 5144.patch, 1.5 KB (added by , 13 years ago) |
---|
-
_source/plugins/clipboard/plugin.js
184 184 var pastebin = new CKEDITOR.dom.element( mode == 'text' ? 'textarea' : 'div', doc ); 185 185 pastebin.setAttribute( 'id', 'cke_pastebin' ); 186 186 // Safari requires a filler node inside the div to have the content pasted into it. (#4882) 187 CKEDITOR.env.webkit && pastebin.append( doc.createText( '\xa0' ) );187 CKEDITOR.env.webkit && pastebin.append( CKEDITOR.dom.element.createFromHtml( '<div>\xa0</div>' ) ); 188 188 doc.getBody().append( pastebin ); 189 189 190 190 // It's definitely a better user experience if we make the paste-bin pretty unnoticed … … 237 237 pastebin.remove(); 238 238 239 239 // Grab the HTML contents. 240 // We need to look for a apple style wrapper on webkit it also adds 240 // In WebKit we always add an empty div inside the pastebin. 241 // After that, we need to look for an apple style wrapper on webkit it also adds 241 242 // a div wrapper if you copy/paste the body of the editor. 242 243 // Remove hidden div and restore selection. 243 244 var bogusSpan; 244 pastebin = ( CKEDITOR.env.webkit245 && ( bogusSpan = pastebin.getFirst() )245 CKEDITOR.env.webkit && ( pastebin = pastebin.getFirst() ) 246 && ( pastebin = ( bogusSpan = pastebin.getFirst() ) 246 247 && ( bogusSpan.is && bogusSpan.hasClass( 'Apple-style-span' ) ) ? 247 248 bogusSpan : pastebin ); 248 249