allow modifying pasted text from paste event
This commit is contained in:
parent
54ad13847a
commit
9253fffb9f
2 changed files with 7 additions and 3 deletions
|
|
@ -832,8 +832,9 @@ var Editor = function(renderer, session) {
|
|||
// todo this should change when paste becomes a command
|
||||
if (this.$readOnly)
|
||||
return;
|
||||
this._emit("paste", text);
|
||||
this.insert(text);
|
||||
var e = {text: text};
|
||||
this._signal("paste", e);
|
||||
this.insert(e.text, true);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -542,7 +542,10 @@ var Editor = require("./editor").Editor;
|
|||
if (this.$readOnly)
|
||||
return;
|
||||
|
||||
this._signal("paste", text);
|
||||
|
||||
var e = {text: text};
|
||||
this._signal("paste", e);
|
||||
text = e.text;
|
||||
if (!this.inMultiSelectMode || this.inVirtualSelectionMode)
|
||||
return this.insert(text);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue