add editor.execCommand function
This commit is contained in:
parent
00f6b46cd3
commit
3677c36a14
2 changed files with 4 additions and 8 deletions
|
|
@ -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);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue