diff --git a/lib/ace/editor.js b/lib/ace/editor.js index 5b387f98..4cf4ef80 100644 --- a/lib/ace/editor.js +++ b/lib/ace/editor.js @@ -694,6 +694,9 @@ var Editor = function(renderer, session) { * called whenever a text "paste" happens. **/ this.onPaste = function(text) { + // todo this should change when paste becomes a command + if (this.$readOnly) + return; this._emit("paste", text); this.insert(text); }; diff --git a/lib/ace/multi_select.js b/lib/ace/multi_select.js index 9cbc5417..eeae8039 100644 --- a/lib/ace/multi_select.js +++ b/lib/ace/multi_select.js @@ -502,7 +502,11 @@ var Editor = require("./editor").Editor; return text; }; + // todo this should change when paste becomes a command this.onPaste = function(text) { + if (this.$readOnly) + return; + this._emit("paste", text); if (!this.inMultiSelectMode) return this.insert(text);