diff --git a/lib/ace/editor.js b/lib/ace/editor.js index 2426247d..30fec403 100644 --- a/lib/ace/editor.js +++ b/lib/ace/editor.js @@ -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); }; diff --git a/lib/ace/multi_select.js b/lib/ace/multi_select.js index 7f4c5355..051d7c8f 100644 --- a/lib/ace/multi_select.js +++ b/lib/ace/multi_select.js @@ -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);