JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.4.3
[ckeditor.git] / _source / adapters / jquery.js
index 314c8ed..3cb8bb6 100644 (file)
@@ -97,6 +97,9 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                 */\r
                ckeditor: function( callback, config )\r
                {\r
+                       if ( !CKEDITOR.env.isCompatible )\r
+                               return this;\r
+\r
                        if ( !jQuery.isFunction( callback ))\r
                        {\r
                                var tmp = config;\r
@@ -183,10 +186,14 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                                                                // Bind to submit event.\r
                                                                $element.parents( 'form' ).submit( onSubmit );\r
 \r
+                                                               // Bind to form-pre-serialize from jQuery Forms plugin.\r
+                                                               $element.parents( 'form' ).bind( 'form-pre-serialize', onSubmit );\r
+\r
                                                                // Unbind when editor destroyed.\r
                                                                $element.bind( 'destroy.ckeditor', function()\r
                                                                {\r
                                                                        $element.parents( 'form' ).unbind( 'submit', onSubmit );\r
+                                                                       $element.parents( 'form' ).unbind( 'form-pre-serialize', onSubmit );\r
                                                                });\r
                                                        }\r
 \r