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 (wrong) 'beforepaste' event fired on toolbar menu open. |
| 386 | var domEvent = evt.data && evt.data.$; |
| 387 | if ( CKEDITOR.env.ie && domEvent && !domEvent.ctrlKey ) |
| 388 | return; |
| 389 | |
386 | 390 | // Fire 'beforePaste' event so clipboard flavor get customized |
387 | 391 | // by other plugins. |
388 | 392 | var eventData = { mode : 'html' }; |
… |
… |
|
401 | 405 | } ); |
402 | 406 | }); |
403 | 407 | |
404 | | // Dismiss the (wrong) 'beforepaste' event fired on context menu open. (#7953) |
405 | | body.on( 'contextmenu', function() |
406 | | { |
407 | | depressBeforeEvent = 1; |
408 | | setTimeout( function() { depressBeforeEvent = 0; }, 10 ); |
409 | | }); |
| 408 | if ( CKEDITOR.env.ie ) |
| 409 | { |
| 410 | // Dismiss the (wrong) 'beforepaste' event fired on context menu open. (#7953) |
| 411 | body.on( 'contextmenu', function() |
| 412 | { |
| 413 | depressBeforeEvent = 1; |
| 414 | // Important: The following timeout will be called only after menu closed. |
| 415 | setTimeout( function() { depressBeforeEvent = 0; }, 0 ); |
| 416 | } ); |
| 417 | |
| 418 | // Handle IE's late coming "paste" event when pasting from |
| 419 | // browser toolbar/context menu. |
| 420 | body.on( 'paste', function( evt ) |
| 421 | { |
| 422 | if ( !editor.document.getById( 'cke_pastebin' ) ) |
| 423 | { |
| 424 | // Prevent native paste. |
| 425 | evt.data.preventDefault(); |
| 426 | |
| 427 | depressBeforeEvent = 0; |
| 428 | // Resort to the paste command. |
| 429 | pasteCmd.exec( editor ); |
| 430 | } |
| 431 | } ); |
| 432 | } |
410 | 433 | |
411 | 434 | body.on( 'beforecut', function() { !depressBeforeEvent && fixCut( editor ); } ); |
412 | 435 | |