| [ Index ] |
PHP Cross Reference of Drupal 6 (gatewave) |
[Summary view] [Print] [Text view]
1 /* 2 Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. 3 For licensing, see LICENSE.html or http://ckeditor.com/license 4 */ 5 6 /** 7 * @fileOverview Contains the third and last part of the {@link CKEDITOR} object 8 * definition. 9 */ 10 11 // Remove the CKEDITOR.loadFullCore reference defined on ckeditor_basic. 12 delete CKEDITOR.loadFullCore; 13 14 /** 15 * Holds references to all editor instances created. The name of the properties 16 * in this object correspond to instance names, and their values contains the 17 * {@link CKEDITOR.editor} object representing them. 18 * @type {Object} 19 * @example 20 * alert( <b>CKEDITOR.instances</b>.editor1.name ); // "editor1" 21 */ 22 CKEDITOR.instances = {}; 23 24 /** 25 * The document of the window holding the CKEDITOR object. 26 * @type {CKEDITOR.dom.document} 27 * @example 28 * alert( <b>CKEDITOR.document</b>.getBody().getName() ); // "body" 29 */ 30 CKEDITOR.document = new CKEDITOR.dom.document( document ); 31 32 /** 33 * Adds an editor instance to the global {@link CKEDITOR} object. This function 34 * is available for internal use mainly. 35 * @param {CKEDITOR.editor} editor The editor instance to be added. 36 * @example 37 */ 38 CKEDITOR.add = function( editor ) 39 { 40 CKEDITOR.instances[ editor.name ] = editor; 41 42 editor.on( 'focus', function() 43 { 44 if ( CKEDITOR.currentInstance != editor ) 45 { 46 CKEDITOR.currentInstance = editor; 47 CKEDITOR.fire( 'currentInstance' ); 48 } 49 }); 50 51 editor.on( 'blur', function() 52 { 53 if ( CKEDITOR.currentInstance == editor ) 54 { 55 CKEDITOR.currentInstance = null; 56 CKEDITOR.fire( 'currentInstance' ); 57 } 58 }); 59 }; 60 61 /** 62 * Removes and editor instance from the global {@link CKEDITOR} object. his function 63 * is available for internal use mainly. 64 * @param {CKEDITOR.editor} editor The editor instance to be added. 65 * @example 66 */ 67 CKEDITOR.remove = function( editor ) 68 { 69 delete CKEDITOR.instances[ editor.name ]; 70 }; 71 72 /** 73 * Perform global clean up to free as much memory as possible 74 * when there are no instances left 75 */ 76 CKEDITOR.on( 'instanceDestroyed', function () 77 { 78 if ( CKEDITOR.tools.isEmpty( this.instances ) ) 79 CKEDITOR.fire( 'reset' ); 80 }); 81 82 // Load the bootstrap script. 83 CKEDITOR.loader.load( 'core/_bootstrap' ); // @Packager.RemoveLine 84 85 // Tri-state constants. 86 87 /** 88 * Used to indicate the ON or ACTIVE state. 89 * @constant 90 * @example 91 */ 92 CKEDITOR.TRISTATE_ON = 1; 93 94 /** 95 * Used to indicate the OFF or NON ACTIVE state. 96 * @constant 97 * @example 98 */ 99 CKEDITOR.TRISTATE_OFF = 2; 100 101 /** 102 * Used to indicate DISABLED state. 103 * @constant 104 * @example 105 */ 106 CKEDITOR.TRISTATE_DISABLED = 0; 107 108 /** 109 * Fired when the CKEDITOR.currentInstance object reference changes. This may 110 * happen when setting the focus on different editor instances in the page. 111 * @name CKEDITOR#currentInstance 112 * @event 113 */
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Thu Mar 24 11:18:33 2011 | Cross-referenced by PHPXref 0.7 |