X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fcore%2Fckeditor.js;h=068da319af4279fba61ae8036cada66e1b701713;hb=refs%2Ftags%2Fv3.3;hp=5e0369367998dfc958326f7ca1fe357e5065a3d2;hpb=941b0a9ba4e673e292510d80a5a86806994b8ea6;p=ckeditor.git diff --git a/_source/core/ckeditor.js b/_source/core/ckeditor.js index 5e03693..068da31 100644 --- a/_source/core/ckeditor.js +++ b/_source/core/ckeditor.js @@ -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 + */