X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fcore%2Fckeditor.js;h=068da319af4279fba61ae8036cada66e1b701713;hb=8665a7c6c60586526e32e8941fe2896739b6ebfb;hp=85da621fe732cc72c57105db75b0db215c21094f;hpb=ea7e3453c7b0f023b050aca6d9f83ab372860d91;p=ckeditor.git diff --git a/_source/core/ckeditor.js b/_source/core/ckeditor.js index 85da621..068da31 100644 --- a/_source/core/ckeditor.js +++ b/_source/core/ckeditor.js @@ -1,5 +1,5 @@ /* -Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved. +Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ @@ -69,6 +69,16 @@ CKEDITOR.remove = function( editor ) delete CKEDITOR.instances[ editor.name ]; }; +/** + * Perform global clean up to free as much memory as possible + * when there are no instances left + */ +CKEDITOR.on( 'instanceDestroyed', function () + { + if ( CKEDITOR.tools.isEmpty( this.instances ) ) + CKEDITOR.fire( 'reset' ); + }); + // Load the bootstrap script. CKEDITOR.loader.load( 'core/_bootstrap' ); // @Packager.RemoveLine @@ -94,3 +104,10 @@ CKEDITOR.TRISTATE_OFF = 2; * @example */ CKEDITOR.TRISTATE_DISABLED = 0; + +/** + * 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 + */