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);
|
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);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -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) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue