add editor.execCommand function

This commit is contained in:
nightwing 2012-10-26 01:50:45 +04:00
commit 3677c36a14
2 changed files with 4 additions and 8 deletions

View file

@ -656,13 +656,9 @@ var Editor = function(renderer, session) {
this.insert(text); this.insert(text);
}; };
/**
* Editor.onDelete() this.execCommand = function(command, args) {
* this.commands.exec(command, this, args);
* called whenever a text "delete" happens.
**/
this.onDelete = function() {
this.commands.exec("del", this);
}; };
/** /**

View file

@ -139,7 +139,7 @@ var TextInput = function(parentNode, host) {
if (data) if (data)
host.onTextInput(data); host.onTextInput(data);
else else
host.onDelete(); host.execCommand("del", {source: "ace"});
}; };
var onCompositionStart = function(e) { var onCompositionStart = function(e) {