IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
|
| 135 | 135 | |
| 136 | 136 | var body = this.document.getBody(); |
| 137 | 137 | |
| 138 | | // Simulate 'beforepaste' event for all none-IEs. |
| 139 | | if ( !CKEDITOR.env.ie && body.fire( 'beforepaste' ) ) |
| 140 | | event.cancel(); |
| 141 | 138 | // Simulate 'paste' event for Opera/Firefox2. |
| 142 | | else if ( CKEDITOR.env.opera |
| | 139 | if ( CKEDITOR.env.opera |
| 143 | 140 | || CKEDITOR.env.gecko && CKEDITOR.env.version < 10900 ) |
| 144 | 141 | body.fire( 'paste' ); |
| 145 | 142 | return; |
| … |
… |
|
| 378 | 375 | editor.on( 'contentDom', function() |
| 379 | 376 | { |
| 380 | 377 | var body = editor.document.getBody(); |
| 381 | | body.on( CKEDITOR.env.webkit ? 'paste' : 'beforepaste', function( evt ) |
| | 378 | |
| | 379 | // Intercept the paste before it actually takes place. |
| | 380 | body.on( !CKEDITOR.env.ie ? 'paste' : 'beforepaste', function( evt ) |
| 382 | 381 | { |
| 383 | 382 | if ( depressBeforeEvent ) |
| 384 | 383 | return; |
| 385 | 384 | |
| | 385 | // Dismiss the "beforepaste" event fired in IE when |
| | 386 | // opening browser toolbar/context menu. |
| | 387 | var domEvent = evt.data && evt.data.$; |
| | 388 | if ( CKEDITOR.env.ie && domEvent && !domEvent.ctrlKey ) |
| | 389 | return; |
| | 390 | |
| 386 | 391 | // Fire 'beforePaste' event so clipboard flavor get customized |
| 387 | 392 | // by other plugins. |
| 388 | 393 | var eventData = { mode : 'html' }; |
| … |
… |
|
| 401 | 406 | } ); |
| 402 | 407 | }); |
| 403 | 408 | |
| 404 | | // Dismiss the (wrong) 'beforepaste' event fired on context menu open. (#7953) |
| 405 | | body.on( 'contextmenu', function() |
| | 409 | // Handle IE's late coming "paste" event when pasting from |
| | 410 | // browser toolbar/context menu. |
| | 411 | CKEDITOR.env.ie && body.on( 'paste', function( evt ) |
| 406 | 412 | { |
| 407 | | depressBeforeEvent = 1; |
| 408 | | setTimeout( function() { depressBeforeEvent = 0; }, 10 ); |
| 409 | | }); |
| | 413 | if ( !editor.document.getById( 'cke_pastebin' ) ) |
| | 414 | { |
| | 415 | // Prevent native paste. |
| | 416 | evt.data.preventDefault(); |
| | 417 | |
| | 418 | // Resort to the paste command. |
| | 419 | pasteCmd.exec( editor ); |
| | 420 | } |
| | 421 | } ); |
| 410 | 422 | |
| 411 | 423 | body.on( 'beforecut', function() { !depressBeforeEvent && fixCut( editor ); } ); |
| 412 | 424 | |