X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fadapters%2Fjquery.js;h=3cb8bb6090c46fd003f59c6a6b42b7276aaf5ea3;hb=9afde8772159bd3436f1f5b7862960307710ae5a;hp=314c8edf85ad625a319f604fb689dc5db6a69ffa;hpb=941b0a9ba4e673e292510d80a5a86806994b8ea6;p=ckeditor.git diff --git a/_source/adapters/jquery.js b/_source/adapters/jquery.js index 314c8ed..3cb8bb6 100644 --- a/_source/adapters/jquery.js +++ b/_source/adapters/jquery.js @@ -97,6 +97,9 @@ For licensing, see LICENSE.html or http://ckeditor.com/license */ ckeditor: function( callback, config ) { + if ( !CKEDITOR.env.isCompatible ) + return this; + if ( !jQuery.isFunction( callback )) { var tmp = config; @@ -183,10 +186,14 @@ For licensing, see LICENSE.html or http://ckeditor.com/license // Bind to submit event. $element.parents( 'form' ).submit( onSubmit ); + // Bind to form-pre-serialize from jQuery Forms plugin. + $element.parents( 'form' ).bind( 'form-pre-serialize', onSubmit ); + // Unbind when editor destroyed. $element.bind( 'destroy.ckeditor', function() { $element.parents( 'form' ).unbind( 'submit', onSubmit ); + $element.parents( 'form' ).unbind( 'form-pre-serialize', onSubmit ); }); }