Diego A. wrote:
Any feedback will be appreciated.
I find an integration plugin that simply registers itself with other
plugins to support any kind of rich text editor for those plugins quite
interesting. That and mabe simplifying the setup of those editors, like
you seem to do with $.FCK().
Integration with the validate plugin is not as plain simple as with the
ajaxSubmit method. I think you'd need to intercept
jQuery.validator.fn.form, but that needs some testing.
On the matter of intercepting I prefer the following pattern in favor of
your approach (renaming to $.fn.ajaxSubmit_):
(function() {
var intercepted = $.fn.ajaxSubmit;
$.fn.ajaxSubmit = function() {
// do something
return intercepted.apply( this, arguments );
});
})();
Saving a reference inside a closure allows you to intercept the method
multiple times. You are already using apply(this, arguments), but
without returning what the original returned.
--
Jörn Zaefferer
http://bassistance.de