fix pasting in readOnly mode

This commit is contained in:
nightwing 2012-08-03 18:27:32 +04:00
commit a9caa11447
2 changed files with 7 additions and 0 deletions

View file

@ -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);
};