/** * @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved. * For licensing, see LICENSE.md or http://ckeditor.com/license */ /** * @fileOverview Contains the first and essential part of the {@link CKEDITOR} * object definition. */ // #### Compressed Code // Compressed code in ckeditor.js must be be updated on changes in the script. // The Closure Compiler online service should be used when updating this manually: // http://closure-compiler.appspot.com/ // #### Raw code // ATTENTION: read the above "Compressed Code" notes when changing this code. if ( !window.CKEDITOR ) { /** * This is the API entry point. The entire CKEditor code runs under this object. * @class CKEDITOR * @singleton */ window.CKEDITOR = ( function() { var basePathSrcPattern = /(^|.*[\\\/])ckeditor\.js(?:\?.*|;.*)?$/i; var CKEDITOR = { /** * A constant string unique for each release of CKEditor. Its value * is used, by default, to build the URL for all resources loaded * by the editor code, guaranteeing clean cache results when * upgrading. * * alert( CKEDITOR.timestamp ); // e.g. '87dm' */ timestamp: '', // %REMOVE_LINE% /* // %REMOVE_LINE% // The production implementation contains a fixed timestamp, unique // for each release and generated by the releaser. // (Base 36 value of each component of YYMMDDHH - 4 chars total - e.g. 87bm == 08071122) timestamp: '%TIMESTAMP%', // %REMOVE_LINE% */ /** * Contains the CKEditor version number. * * alert( CKEDITOR.version ); // e.g. 'CKEditor 3.4.1' */ version: '%VERSION%', /** * Contains the CKEditor revision number. * The revision number is incremented automatically, following each * modification to the CKEditor source code. * * alert( CKEDITOR.revision ); // e.g. '3975' */ revision: '%REV%', /** * A 3-digit random integer, valid for the entire life of the CKEDITOR object. * * alert( CKEDITOR.rnd ); // e.g. 319 * * @property {Number} */ rnd: Math.floor( Math.random() * ( 999 /*Max*/ - 100 /*Min*/ + 1 ) ) + 100 /*Min*/, /** * Private object used to hold core stuff. It should not be used outside of * the API code as properties defined here may change at any time * without notice. * * @private */ _: { pending: [], basePathSrcPattern: basePathSrcPattern }, /** * Indicates the API loading status. The following statuses are available: * * * **unloaded**: the API is not yet loaded. * * **basic_loaded**: the basic API features are available. * * **basic_ready**: the basic API is ready to load the full core code. * * **loaded**: the API can be fully used. * * Example: * * if ( CKEDITOR.status == 'loaded' ) { * // The API can now be fully used. * doSomething(); * } else { * // Wait for the full core to be loaded and fire its loading. * CKEDITOR.on( 'load', doSomething ); * CKEDITOR.loadFullCore && CKEDITOR.loadFullCore(); * } */ status: 'unloaded', /** * The full URL for the CKEditor installation directory. * It is possible to manually provide the base path by setting a * global variable named `CKEDITOR_BASEPATH`. This global variable * must be set **before** the editor script loading. * * alert( CKEDITOR.basePath ); // e.g. 'http://www.example.com/ckeditor/' * * @property {String} */ basePath: ( function() { // Find out the editor directory path, based on its