if (this.fireEvent) {
this.bindEvents();
}
+ this.reset();
};
})
);
}
+
+ Roo.log("transaction: pos:" + this.position + " len: " + this.length + " slen:" + this.stack.length);
+
+
},
undo : function ()
{
+ Roo.log("undo: pos:" + this.position + " len: " + this.length + " slen:" + this.stack.length);
+
if (this.position < this.length) {
for (var i = this.stack[this.position].length - 1; i >= 0; i--) {
this.stack[this.position][i].undo();
}
this.timer = false;
this.merge = false;
+ this.addEvent();
},
current_html : '',
e.preventDefault();
}
});
+ /// ignore keyup..
+ this.scope.addEventListener('keyup', function(e) {
+ if ((e.ctrlKey || e.metaKey) && e.keyCode === 90) {
+ e.preventDefault();
+ }
+ });
+
var t = this;
addEvent : function(merge)
{
+ Roo.log("undomanager +" + (merge ? 'Y':'n'));
// not sure if this should clear the timer
merge = typeof(merge) == 'undefined' ? false : merge;
- el.undoManager.transact({
+ this.scope.undoManager.transact({
+ scope : this.scope,
oldHTML: this.current_html,
newHTML: this.scope.innerHTML,
// nothing to execute (content already changed when input is fired)
redo: function() {
this.scope.innerHTML = this.current_html = this.newHTML;
}
- }, merge);
+ }, false); //merge);
this.merge = merge;
- this.current_html = el.innerHTML;
+ this.current_html = this.scope.innerHTML;
}