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);
};
/**
* Editor.onDelete()
*
* called whenever a text "delete" happens.
**/
this.onDelete = function() {
this.commands.exec("del", this);
this.execCommand = function(command, args) {
this.commands.exec(command, this, args);
};
/**

View file

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