-
Notifications
You must be signed in to change notification settings - Fork 96
/
_bootstrap.js
executable file
·78 lines (64 loc) · 1.96 KB
/
_bootstrap.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
/**
* @fileOverview API initialization code.
*/
(function()
{
// Check is High Contrast is active by creating a temporary element with a
// background image.
var useSpacer = CKEDITOR.env.ie && CKEDITOR.env.version < 7,
useBlank = CKEDITOR.env.ie && CKEDITOR.env.version == 7;
var backgroundImageUrl = useSpacer ? ( CKEDITOR.basePath + 'images/spacer.gif' ) :
useBlank ? 'about:blank' : 'data:image/png;base64,';
var hcDetect = CKEDITOR.dom.element.createFromHtml(
'<div style="width:0px;height:0px;' +
'position:absolute;left:-10000px;' +
'background-image:url(' + backgroundImageUrl + ')"></div>', CKEDITOR.document );
hcDetect.appendTo( CKEDITOR.document.getHead() );
// Update CKEDITOR.env.
// Catch exception needed sometimes for FF. (#4230)
try
{
CKEDITOR.env.hc = ( hcDetect.getComputedStyle( 'background-image' ) == 'none' );
}
catch (e)
{
CKEDITOR.env.hc = false;
}
if ( CKEDITOR.env.hc )
CKEDITOR.env.cssClass += ' cke_hc';
hcDetect.remove();
})();
// Load core plugins.
CKEDITOR.plugins.load( CKEDITOR.config.corePlugins.split( ',' ), function()
{
CKEDITOR.status = 'loaded';
CKEDITOR.fire( 'loaded' );
// Process all instances created by the "basic" implementation.
var pending = CKEDITOR._.pending;
if ( pending )
{
delete CKEDITOR._.pending;
for ( var i = 0 ; i < pending.length ; i++ )
CKEDITOR.add( pending[ i ] );
}
});
/*
TODO: Enable the following and check if effective.
if ( CKEDITOR.env.ie )
{
// Remove IE mouse flickering on IE6 because of background images.
try
{
document.execCommand( 'BackgroundImageCache', false, true );
}
catch (e)
{
// We have been reported about loading problems caused by the above
// line. For safety, let's just ignore errors.
}
}
*/