Search code examples
ajaxckeditor

CkEditor Doesn't post value


When a form with a textarea using CkEditor is submitted using ajax the post is empty on the server side.

If I remove CkEditor, the value is posted. Any ideas?


Solution

  • On submit, run this code:

    for (instance in CKEDITOR.instances) {
        CKEDITOR.instances[instance].updateElement();
    }
    

    .. basically for AJAX, you need to force CKEditor to update your textareas so they contain the data you see in the CKEditor windows. See this question for more details.