2 Copyright (c) 2003-2011, 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 // Disable HC detaction in WebKit. (#5429)
\r
13 if ( CKEDITOR.env.webkit )
\r
15 CKEDITOR.env.hc = false;
\r
19 // Check whether high contrast is active by creating a colored border.
\r
20 var hcDetect = CKEDITOR.dom.element.createFromHtml(
\r
21 '<div style="width:0px;height:0px;position:absolute;left:-10000px;' +
\r
22 'border: 1px solid;border-color: red blue;"></div>', CKEDITOR.document );
\r
24 hcDetect.appendTo( CKEDITOR.document.getHead() );
\r
26 // Update CKEDITOR.env.
\r
27 // Catch exception needed sometimes for FF. (#4230)
\r
30 CKEDITOR.env.hc = hcDetect.getComputedStyle( 'border-top-color' ) == hcDetect.getComputedStyle( 'border-right-color' );
\r
34 CKEDITOR.env.hc = false;
\r
37 if ( CKEDITOR.env.hc )
\r
38 CKEDITOR.env.cssClass += ' cke_hc';
\r
43 // Load core plugins.
\r
44 CKEDITOR.plugins.load( CKEDITOR.config.corePlugins.split( ',' ), function()
\r
46 CKEDITOR.status = 'loaded';
\r
47 CKEDITOR.fire( 'loaded' );
\r
49 // Process all instances created by the "basic" implementation.
\r
50 var pending = CKEDITOR._.pending;
\r
53 delete CKEDITOR._.pending;
\r
55 for ( var i = 0 ; i < pending.length ; i++ )
\r
56 CKEDITOR.add( pending[ i ] );
\r
60 // Needed for IE6 to not request image (HTTP 200 or 304) for every CSS background. (#6187)
\r
61 if ( CKEDITOR.env.ie )
\r
63 // Remove IE mouse flickering on IE6 because of background images.
\r
66 document.execCommand( 'BackgroundImageCache', false, true );
\r
70 // We have been reported about loading problems caused by the above
\r
71 // line. For safety, let's just ignore errors.
\r
76 * Indicates that CKEditor is running on a High Contrast environment.
\r
77 * @name CKEDITOR.env.hc
\r
79 * if ( CKEDITOR.env.hc )
\r
80 * alert( 'You're running on High Contrast mode. The editor interface will get adapted to provide you a better experience.' );
\r
84 * Fired when a CKEDITOR core object is fully loaded and ready for interaction.
\r
85 * @name CKEDITOR#loaded
\r