Code Index | File Index

Namespaces

Classes


Namespace CKEDITOR.env

Environment and browser information.
Defined in: core/env.js.

Field Summary
Field Attributes Field Name and Description
<static>  
CKEDITOR.env.air
Indicates that CKEditor is running on Adobe AIR.
<static>  
CKEDITOR.env.cssClass
The CSS class to be appended on the main UI containers, making it easy to apply browser specific styles to it.
<static>  
CKEDITOR.env.gecko
Indicates that CKEditor is running on a Gecko based browser, like Firefox.
<static>  
CKEDITOR.env.hc
Indicates that CKEditor is running on a High Contrast environment.
<static>  
CKEDITOR.env.ie
Indicates that CKEditor is running on Internet Explorer.
<static>  
CKEDITOR.env.ie6Compat
Indicates that CKEditor is running on an IE6-like environment, which includes IE6 itself and IE7 and IE8 quirks mode.
<static>  
CKEDITOR.env.ie7Compat
Indicates that CKEditor is running on an IE7-like environment, which includes IE7 itself and IE8's IE7 document mode.
<static>  
CKEDITOR.env.ie8
Indicates that CKEditor is running on Internet Explorer 8.
<static>  
CKEDITOR.env.ie8Compat
Indicates that CKEditor is running on Internet Explorer 8 on standards mode.
<static>  
CKEDITOR.env.ie9Compat
Indicates that CKEditor is running on Internet Explorer 9's standards mode.
<static>  
CKEDITOR.env.iOS
Indicates that CKEditor is running on Apple iPhone/iPad/iPod devices.
<static>  
CKEDITOR.env.isCompatible
Indicates that CKEditor is running on a compatible browser.
<static>  
CKEDITOR.env.mac
Indicates that CKEditor is running on Macintosh.
<static>  
CKEDITOR.env.mobile
Indicates that CKEditor is running on a mobile like environemnt.
<static>  
CKEDITOR.env.opera
Indicates that CKEditor is running on Opera.
<static>  
CKEDITOR.env.quirks
Indicates that CKEditor is running on a quirks mode environemnt.
<static>  
CKEDITOR.env.secure
Indicates that page is running under an encrypted connection.
<static>  
CKEDITOR.env.version
Contains the browser version.
<static>  
CKEDITOR.env.webkit
Indicates that CKEditor is running on a WebKit based browser, like Safari.
Method Summary
Method Attributes Method Name and Description
<static>  
CKEDITOR.env.isCustomDomain()
Indicates that the browser has a custom domain enabled.
Field Detail
<static> {Boolean} CKEDITOR.env.air
Since: 3.0
Indicates that CKEditor is running on Adobe AIR.
if ( CKEDITOR.env.air )
    alert( "I'm on AIR!" );

<static> {String} CKEDITOR.env.cssClass
Since: 3.0
The CSS class to be appended on the main UI containers, making it easy to apply browser specific styles to it.
myDiv.className = CKEDITOR.env.cssClass;

<static> {Boolean} CKEDITOR.env.gecko
Since: 3.0
Indicates that CKEditor is running on a Gecko based browser, like Firefox.
if ( CKEDITOR.env.gecko )
    alert( "I'm riding a gecko!" );

<static> {Undefined} CKEDITOR.env.hc
Since: 3.0
Indicates that CKEditor is running on a High Contrast environment.
Defined in: core/_bootstrap.js.
if ( CKEDITOR.env.hc )
    alert( 'You're running on High Contrast mode. The editor interface will get adapted to provide you a better experience.' );

<static> {Boolean} CKEDITOR.env.ie
Since: 3.0
Indicates that CKEditor is running on Internet Explorer.
if ( CKEDITOR.env.ie )
    alert( "I'm on IE!" );

<static> {Boolean} CKEDITOR.env.ie6Compat
Since: 3.0
Indicates that CKEditor is running on an IE6-like environment, which includes IE6 itself and IE7 and IE8 quirks mode.
if ( CKEDITOR.env.ie6Compat )
    alert( "I'm on IE6 or quirks mode!" );

<static> {Boolean} CKEDITOR.env.ie7Compat
Since: 3.0
Indicates that CKEditor is running on an IE7-like environment, which includes IE7 itself and IE8's IE7 document mode.
if ( CKEDITOR.env.ie8Compat )
    alert( "I'm on IE7 or on an IE7 like IE8!" );

<static> {Boolean} CKEDITOR.env.ie8
Since: 3.0
Indicates that CKEditor is running on Internet Explorer 8.
if ( CKEDITOR.env.ie8 )
    alert( "I'm on IE8!" );

<static> {Boolean} CKEDITOR.env.ie8Compat
Since: 3.0
Indicates that CKEditor is running on Internet Explorer 8 on standards mode.
if ( CKEDITOR.env.ie8Compat )
    alert( "Now I'm on IE8, for real!" );

<static> {Boolean} CKEDITOR.env.ie9Compat
Since: 3.0
Indicates that CKEditor is running on Internet Explorer 9's standards mode.
if ( CKEDITOR.env.ie9Compat )
    alert( "IE9, the beauty of the web!" );

<static> {Boolean} CKEDITOR.env.iOS
Since: 3.0
Indicates that CKEditor is running on Apple iPhone/iPad/iPod devices.
if ( CKEDITOR.env.iOS )
    alert( "I like little apples!" );

<static> {Boolean} CKEDITOR.env.isCompatible
Since: 3.0
Indicates that CKEditor is running on a compatible browser.
if ( CKEDITOR.env.isCompatible )
    alert( "Your browser is pretty cool!" );

<static> {Boolean} CKEDITOR.env.mac
Since: 3.0
Indicates that CKEditor is running on Macintosh.
if ( CKEDITOR.env.mac )
    alert( "I love apples!" );

<static> {Boolean} CKEDITOR.env.mobile
Since: 3.0
Indicates that CKEditor is running on a mobile like environemnt.
if ( CKEDITOR.env.mobile )
    alert( "I'm running with CKEditor today!" );

<static> {Boolean} CKEDITOR.env.opera
Since: 3.0
Indicates that CKEditor is running on Opera.
if ( CKEDITOR.env.opera )
    alert( "I'm on Opera!" );

<static> {Boolean} CKEDITOR.env.quirks
Since: 3.0
Indicates that CKEditor is running on a quirks mode environemnt.
if ( CKEDITOR.env.quirks )
    alert( "Nooooo!" );

<static> {Boolean} CKEDITOR.env.secure
Since: 3.0
Indicates that page is running under an encrypted connection.
if ( CKEDITOR.env.secure )
    alert( "I'm in SSL!" );

<static> {Boolean} CKEDITOR.env.version
Since: 3.0
Contains the browser version.

For gecko based browsers (like Firefox) it contains the revision number with first three parts concatenated with a padding zero (e.g. for revision 1.9.0.2 we have 10900).

For webkit based browser (like Safari and Chrome) it contains the WebKit build version (e.g. 522).
if ( CKEDITOR.env.ie && CKEDITOR.env.version <= 6 )
    alert( "Ouch!" );

<static> {Boolean} CKEDITOR.env.webkit
Since: 3.0
Indicates that CKEditor is running on a WebKit based browser, like Safari.
if ( CKEDITOR.env.webkit )
    alert( "I'm on WebKit!" );
Method Detail
<static> {Boolean} CKEDITOR.env.isCustomDomain()
Since: 3.0
Indicates that the browser has a custom domain enabled. This has been set with "document.domain".
if ( CKEDITOR.env.isCustomDomain() )
    alert( "I'm in a custom domain!" );
Returns:
{Boolean} "true" if a custom domain is enabled.

Copyright © 2003-2010, CKSource - Frederico Knabben. All rights reserved.