0

Is there an event with the jquery validator plugin that I hook into? It is a bit of a follow up to these questions:

CKEditor and ASP.Net MVC 3 RequiredAttribute

JQuery Validation PlugIn - submitHandler syntax

Basically I have a CKEditor that is not playing nice with jquery required validator. My thought was to hook into some event on validation so I can run this code:

var editor = $('#Body').ckeditorGet();
     editor.updateElement();

I looked into submitHandler, but that doesn't happen until AFTER validation takes place.

Also, this is on asp.net MVC 3 although don't think that matters...

Community
  • 1
  • 1
B Z
  • 9,363
  • 16
  • 67
  • 91

1 Answers1

1

I had a similar problem and fixed it be adding code to the click handler of the input field like this

$('input[type=submit]').bind('click', function () {
    var editor = $('#Body').ckeditorGet();
    editor.updateElement();
});
Gluip
  • 2,917
  • 4
  • 37
  • 46