How to ajax-submit a form textarea input from CKEditor?

后端 未结 6 1001
故里飘歌
故里飘歌 2020-11-28 04:13

I am using CKEditor, jQuery and jQuery form plugin and I would like to submit contents of the CkEditor form via an Ajax query. Here is my code:

6条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-28 04:47

    This works for me best: beforeSerialize callback

    $('form#description').ajaxForm({
        beforeSerialize:function($Form, options){
            /* Before serialize */
            for ( instance in CKEDITOR.instances ) {
                CKEDITOR.instances[instance].updateElement();
            }
            return true; 
        },
        // other options
    });
    

提交回复
热议问题