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

you need to first call the following, to make the CKEDITORs update their related fields..

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

so

HTML

<a onClick="CKupdate();$('#article-form').ajaxSubmit();">Submit</a>

and javascript

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

Leave a Comment