Skip to content

Commit

Permalink
Docs: Added missing data object for afterCommandExec event, aligned t…
Browse files Browse the repository at this point in the history
…he command name casing.
  • Loading branch information
mlewand committed Oct 21, 2016
1 parent 94d4328 commit df58bcb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions core/commanddefinition.js
Expand Up @@ -52,11 +52,15 @@
* command itself manually, and that the return value of this command is not to
* be returned by the {@link #exec} function.
*
* editorInstance.addCommand( 'loadOptions', {
* editorInstance.addCommand( 'loadoptions', {
* exec: function( editor ) {
* var cmd = this;
* // Asynchronous operation below.
* CKEDITOR.ajax.loadXml( 'data.xml', function() {
* editor.fire( 'afterCommandExec' );
* editor.fire( 'afterCommandExec', {
* name: 'loadoptions',
* command: cmd
* } );
* } );
* },
* async: true // The command need some time to complete after exec function returns.
Expand Down

0 comments on commit df58bcb

Please sign in to comment.