X-Git-Url: https://jasonwoof.com/gitweb/?p=ckeditor.git;a=blobdiff_plain;f=_source%2Fcore%2Fckeditor.js;h=59f76b762cd234b5cfa07fe4fb4798a3951dc461;hp=068da319af4279fba61ae8036cada66e1b701713;hb=039a051ccf3901311661022a30afd60fc38130c9;hpb=c9fdde67e6384bd5a66adc2b3bba5c4ce9db56c7 diff --git a/_source/core/ckeditor.js b/_source/core/ckeditor.js index 068da31..59f76b7 100644 --- a/_source/core/ckeditor.js +++ b/_source/core/ckeditor.js @@ -106,8 +106,28 @@ 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; + * }); */