2 Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.
\r
3 For licensing, see LICENSE.html or http://ckeditor.com/license
\r
7 * @fileOverview API initialization code.
\r
12 // Check is High Contrast is active by creating a temporary element with a
\r
13 // background image.
\r
15 var testImage = ( CKEDITOR.env.ie && CKEDITOR.env.version < 7 ) ? ( CKEDITOR.basePath + 'images/spacer.gif' ) : 'about:blank';
\r
17 var hcDetect = CKEDITOR.dom.element.createFromHtml(
\r
18 '<div style="width:0px;height:0px;' +
\r
19 'position:absolute;left:-10000px;' +
\r
20 'background-image:url(' + testImage + ')"></div>', CKEDITOR.document );
\r
22 hcDetect.appendTo( CKEDITOR.document.getHead() );
\r
24 // Update CKEDITOR.env.
\r
25 // Catch exception needed sometimes for FF. (#4230)
\r
28 CKEDITOR.env.hc = ( hcDetect.getComputedStyle( 'background-image' ) == 'none' );
\r
32 CKEDITOR.env.hc = false;
\r
34 if ( CKEDITOR.env.hc )
\r
35 CKEDITOR.env.cssClass += ' cke_hc';
\r
40 // Load core plugins.
\r
41 CKEDITOR.plugins.load( CKEDITOR.config.corePlugins.split( ',' ), function()
\r
43 CKEDITOR.status = 'loaded';
\r
44 CKEDITOR.fire( 'loaded' );
\r
46 // Process all instances created by the "basic" implementation.
\r
47 var pending = CKEDITOR._.pending;
\r
50 delete CKEDITOR._.pending;
\r
52 for ( var i = 0 ; i < pending.length ; i++ )
\r
53 CKEDITOR.add( pending[ i ] );
\r
58 TODO: Enable the following and check if effective.
\r
60 if ( CKEDITOR.env.ie )
\r
62 // Remove IE mouse flickering on IE6 because of background images.
\r
65 document.execCommand( 'BackgroundImageCache', false, true );
\r
69 // We have been reported about loading problems caused by the above
\r
70 // line. For safety, let's just ignore errors.
\r