Pass through the "item" parameter to registerAceCommand callbacks.
This commit is contained in:
parent
c5638dd7e5
commit
56b851a46f
|
@ -12,7 +12,7 @@ Shows the dropdown `div.popup` whose `id` equals `dropdown`.
|
||||||
Register a handler for a specific command. Commands are fired if the corresponding button is clicked or the corresponding select is changed.
|
Register a handler for a specific command. Commands are fired if the corresponding button is clicked or the corresponding select is changed.
|
||||||
|
|
||||||
## registerAceCommand(cmd, callback)
|
## registerAceCommand(cmd, callback)
|
||||||
Creates an ace callstack and calls the callback with an ace instance: `callback(cmd, ace)`.
|
Creates an ace callstack and calls the callback with an ace instance (and a toolbar item, if applicable): `callback(cmd, ace, item)`.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
```
|
```
|
||||||
|
|
|
@ -242,9 +242,9 @@ var padeditbar = (function()
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
registerAceCommand: function (cmd, callback) {
|
registerAceCommand: function (cmd, callback) {
|
||||||
this.registerCommand(cmd, function (cmd, ace) {
|
this.registerCommand(cmd, function (cmd, ace, item) {
|
||||||
ace.callWithAce(function (ace) {
|
ace.callWithAce(function (ace) {
|
||||||
callback(cmd, ace);
|
callback(cmd, ace, item);
|
||||||
}, cmd, true);
|
}, cmd, true);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue