| 1440 | | } |
| | 1440 | }, |
| | 1441 | |
| | 1442 | /** |
| | 1443 | * Adding an iframe shim to this element, OR removing the existing one if already applied. |
| | 1444 | * Note: This will only affect IE version below 7. |
| | 1445 | */ |
| | 1446 | iframeShim : function() |
| | 1447 | { |
| | 1448 | if ( CKEDITOR.env.ie && CKEDITOR.env.ie.version > 6 ) |
| | 1449 | return false; |
| | 1450 | |
| | 1451 | var existingShim; |
| | 1452 | if ( existingShim = this.getCustomData( 'cke_iframe_shim' ) ) |
| | 1453 | { |
| | 1454 | this.removeCustomData( 'cke_iframe_shim' ); |
| | 1455 | this.getDocument().getById( existingShim ).remove(); |
| | 1456 | return true; |
| | 1457 | } |
| | 1458 | |
| | 1459 | var id = 'cke_iframe_shim_' + CKEDITOR.tools.getNextNumber(), |
| | 1460 | shim = '<iframe id="' + id + '" frameborder="0" tabindex="-1"' + |
| | 1461 | ' src="javascript:' + |
| | 1462 | 'void((function(){' + |
| | 1463 | 'document.open();' + |
| | 1464 | ( CKEDITOR.env.isCustomDomain() ? 'document.domain=\'' + this.getDocument().$.domain + '\';' : '' ) + |
| | 1465 | 'document.close();' + |
| | 1466 | '})())"' + |
| | 1467 | ' style="display:block;position:fixed;z-index:-1;' + |
| | 1468 | 'top:expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+\'px\');' + |
| | 1469 | 'left:expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+\'px\');' + |
| | 1470 | 'width:expression(this.parentNode.offsetWidth+\'px\');' + |
| | 1471 | 'height:expression(this.parentNode.offsetHeight+\'px\');' + |
| | 1472 | 'progid:DXImageTransform.Microsoft.Alpha(opacity=0);' + |
| | 1473 | '"></iframe>'; |
| | 1474 | |
| | 1475 | |
| | 1476 | this.setCustomData( 'cke_iframe_shim', id ); |
| | 1477 | return this.append( CKEDITOR.dom.element.createFromHtml( shim ), true ); |
| | 1478 | } |