I am currently attempting to use AJAX to post the value of a CKEditor textarea. I have come across code in this community that looks like this:
for (instance in CKEDITOR.instances) {
CKEDITOR.instances[instance].updateElement();
}
The issue I am encountering is that the posted value is not being updated correctly. The AJAX call is posting the old value instead. For example, if the value of textarea1 is 'hello', on first submit nothing gets posted. But after clicking the submit button again, it does send 'hello'. If I then update the value to 'ciao' and submit again, it still sends 'hello'. However, subsequent submits will finally send 'ciao'. It's a bit confusing, I know.
Does anyone understand what could be causing this problem?
Thank you.