tinymce.Env

This class contains various environment constants like browser versions etc. Normally you don’t want to sniff specific browser versions but sometimes you have to when it’s impossible to feature detect. So use this with care.

Summary

Properties

Name Type Summary Defined by

browser.current

String

Returns the current browser name.

Env

browser.version

Object

Returns the current browser major and minor version.

Env

documentMode

Number

Returns the IE document mode. For non IE browsers, this will fake IE 10 document mode.

Env

os.current

String

Returns the current operating system name.

Env

os.version

Object

Returns the current operating system major and minor version.

Env

transparentSrc

Boolean

Transparent image data url.

Env

Methods

Name Summary Defined by

browser.isChromium()

Returns true if the user’s browser is Chromium based, such as Google Chrome or newer versions of Microsoft Edge.

Env

browser.isEdge()

Returns true if the user’s browser is Microsoft Edge Legacy. Does not return true for the newer Chromium-based Microsoft Edge.

Env

browser.isFirefox()

Returns true if the user’s browser is Firefox.

Env

browser.isIE()

Returns true if the user’s browser is Microsoft Internet Explorer.

Env

browser.isOpera()

Returns true if the user’s browser is Opera.

Env

browser.isSafari()

Returns true if the user’s browser is Safari.

Env

deviceType.isDesktop()

Returns true if the user’s device is a desktop device.

Env

deviceType.isPhone()

Returns true if the user’s device is a phone.

Env

deviceType.isTablet()

Returns true if the user’s device is a tablet.

Env

deviceType.isTouch()

Returns true if the user’s device is a touch device.

Env

deviceType.isWebView()

Returns true if the user’s device is a WebView device.

Env

deviceType.isiPad()

Returns true if the user’s device is an iPad.

Env

deviceType.isiPhone()

Returns true if the user’s device is an iPhone.

Env

os.isAndroid()

Returns true if the user’s operating system is Android.

Env

os.isChromeOS()

Returns true if the user’s operating system is ChromeOS.

Env

os.isFreeBSD()

Returns true if the user’s operating system is FreeBSD.

Env

os.isLinux()

Returns true if the user’s operating system is Linux.

Env

os.isMacOS()

Returns true if the user’s operating system is macOS.

Env

os.isSolaris()

Returns true if the user’s operating system is Solaris.

Env

os.isWindows()

Returns true if the user’s operating system is Microsoft Windows.

Env

os.isiOS()

Returns true if the user’s operating system is iOS.

Env

Methods

browser.isChromium()

browser.isChromium(): Boolean

Returns true if the user’s browser is Chromium based, such as Google Chrome or newer versions of Microsoft Edge.

Return value

  • Boolean - Returns true if the user’s browser is Chromium based.


browser.isEdge()

browser.isEdge(): Boolean

Returns true if the user’s browser is Microsoft Edge Legacy. Does not return true for the newer Chromium-based Microsoft Edge.

Return value

  • Boolean - Returns true if the user’s browser is Microsoft Edge Legacy.


browser.isFirefox()

browser.isFirefox(): Boolean

Returns true if the user’s browser is Firefox.

Return value

  • Boolean - Returns true if the user’s browser is Firefox.


browser.isIE()

browser.isIE(): Boolean

Returns true if the user’s browser is Microsoft Internet Explorer.

Return value

  • Boolean - Returns true if the user’s browser is Microsoft Internet Explorer.


browser.isOpera()

browser.isOpera(): Boolean

Returns true if the user’s browser is Opera.

Return value

  • Boolean - Returns true if the user’s browser is Opera.


browser.isSafari()

browser.isSafari(): Boolean

Returns true if the user’s browser is Safari.

Return value

  • Boolean - Returns true if the user’s browser is Safari.


deviceType.isDesktop()

deviceType.isDesktop(): Boolean

Returns true if the user’s device is a desktop device.

Return value

  • Boolean - Returns true if the user’s device is a desktop device.


deviceType.isPhone()

deviceType.isPhone(): Boolean

Returns true if the user’s device is a phone.

Return value

  • Boolean - Returns true if the user’s device is a phone.


deviceType.isTablet()

deviceType.isTablet(): Boolean

Returns true if the user’s device is a tablet.

Return value

  • Boolean - Returns true if the user’s device is a tablet.


deviceType.isTouch()

deviceType.isTouch(): Boolean

Returns true if the user’s device is a touch device.

Return value

  • Boolean - Returns true if the user’s device is a touch device.


deviceType.isWebView()

deviceType.isWebView(): Boolean

Returns true if the user’s device is a WebView device.

Return value

  • Boolean - Returns true if the user’s device is a WebView device.


deviceType.isiPad()

deviceType.isiPad(): Boolean

Returns true if the user’s device is an iPad.

Return value

  • Boolean - Returns true if the user’s device is an iPad.


deviceType.isiPhone()

deviceType.isiPhone(): Boolean

Returns true if the user’s device is an iPhone.

Return value

  • Boolean - Returns true if the user’s device is an iPhone.


os.isAndroid()

os.isAndroid(): Boolean

Returns true if the user’s operating system is Android.

Return value

  • Boolean - Returns true if the user’s operating system is Android.


os.isChromeOS()

os.isChromeOS(): Boolean

Returns true if the user’s operating system is ChromeOS.

Return value

  • Boolean - Returns true if the user’s operating system is ChromeOS.


os.isFreeBSD()

os.isFreeBSD(): Boolean

Returns true if the user’s operating system is FreeBSD.

Return value

  • Boolean - Returns true if the user’s operating system is FreeBSD.


os.isLinux()

os.isLinux(): Boolean

Returns true if the user’s operating system is Linux.

Return value

  • Boolean - Returns true if the user’s operating system is Linux.


os.isMacOS()

os.isMacOS(): Boolean

Returns true if the user’s operating system is macOS.

Return value

  • Boolean - Returns true if the user’s operating system is macOS.


os.isSolaris()

os.isSolaris(): Boolean

Returns true if the user’s operating system is Solaris.

Return value

  • Boolean - Returns true if the user’s operating system is Solaris.


os.isWindows()

os.isWindows(): Boolean

Returns true if the user’s operating system is Microsoft Windows.

Return value

  • Boolean - Returns true if the user’s operating system is Microsoft Windows.


os.isiOS()

os.isiOS(): Boolean

Returns true if the user’s operating system is iOS.

Return value

  • Boolean - Returns true if the user’s operating system is iOS.