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