I'm trying to extend texteditor with undo function with this code:
$.extend($.fn.texteditor.defaults.commands, {
'undo': {
type: 'linkbutton',
iconCls: 'icon-undo-bn',
onClick: function(){
var disabled = $(this).texteditor('getEditor').dialog('dialog').hasClass('texteditor-disabled');
var readonly = $(this).texteditor('getEditor').dialog('dialog').hasClass('texteditor-readonly');
if ((disabled === false) && (readonly === false)) {
var t = $(this).texteditor('getEditor');
t.focus();
t.trigger('mouseup');
t.texteditor('execCommand','undo');
}
}
}
});
I noticed a strange issue when I use it on a page where there is also a datagrid with "editable datagrid" and/or "datagrid filter row" extensions enabled
In this case I've an undo effect on datagrid textbox fields generated by these extensions