Code Index | File Index

Namespaces

Classes


Namespace CKEDITOR.env

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

Namespace Summary
Constructor Attributes Constructor Name and Description
 
Environment and browser information.
Field Summary
Field Attributes Field Name and Description
<static>  
CKEDITOR.env.air
Indicates that CKEditor is running on Adobe AIR.
<static>  
CKEDITOR.env.gecko
Indicates that CKEditor is running on a Gecko based browser, like Firefox.
<static>  
CKEDITOR.env.ie
Indicates that CKEditor is running on Internet Explorer.
<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.opera
Indicates that CKEditor is running on Opera.
<static>  
CKEDITOR.env.version
Contains the browser version.
<static>  
CKEDITOR.env.webkit
Indicates that CKEditor is running on a WebKit based browser, like Safari.
Namespace Detail
CKEDITOR.env
Since: 3.0
Environment and browser information.
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> {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> {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.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.opera
Since: 3.0
Indicates that CKEditor is running on Opera.
if ( CKEDITOR.env.opera )
    alert( "I'm on Opera!" );

<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!" );

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