X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fcore%2Fckeditor.js;h=086a8668cd4b0c3e17ec2cd7b08e7bf907d6883a;hb=2f22c0c38f17e75be5541089076885442aaa2377;hp=068da319af4279fba61ae8036cada66e1b701713;hpb=8665a7c6c60586526e32e8941fe2896739b6ebfb;p=ckeditor.git diff --git a/_source/core/ckeditor.js b/_source/core/ckeditor.js index 068da31..086a866 100644 --- a/_source/core/ckeditor.js +++ b/_source/core/ckeditor.js @@ -1,5 +1,5 @@ /* -Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ @@ -59,9 +59,10 @@ CKEDITOR.add = function( editor ) }; /** - * Removes and editor instance from the global {@link CKEDITOR} object. his function - * is available for internal use mainly. - * @param {CKEDITOR.editor} editor The editor instance to be added. + * Removes an editor instance from the global {@link CKEDITOR} object. This function + * is available for internal use only. External code must use {@link CKEDITOR.editor.prototype.destroy} + * to avoid memory leaks. + * @param {CKEDITOR.editor} editor The editor instance to be removed. * @example */ CKEDITOR.remove = function( editor ) @@ -106,8 +107,35 @@ CKEDITOR.TRISTATE_OFF = 2; CKEDITOR.TRISTATE_DISABLED = 0; /** + * The editor which is currently active (have user focus). + * @name CKEDITOR.currentInstance + * @type CKEDITOR.editor + * @see CKEDITOR#currentInstance + * @example + * function showCurrentEditorName() + * { + * if ( CKEDITOR.currentInstance ) + * alert( CKEDITOR.currentInstance.name ); + * else + * alert( 'Please focus an editor first.' ); + * } + */ + +/** * Fired when the CKEDITOR.currentInstance object reference changes. This may * happen when setting the focus on different editor instances in the page. * @name CKEDITOR#currentInstance * @event + * var editor; // Variable to hold a reference to the current editor. + * CKEDITOR.on( 'currentInstance' , function( e ) + * { + * editor = CKEDITOR.currentInstance; + * }); + */ + +/** + * Fired when the last instance has been destroyed. This event is used to perform + * global memory clean up. + * @name CKEDITOR#reset + * @event */