I have a textarea as such:
<textarea name="Circumstances" id="Circumstances"> </textarea>
I have turned this into a CKEditor textarea using this:
<script src="ckeditor/ckeditor.js"></script>
<script src="ckeditor/adapters/jquery.js"></script>
<script>
CKEDITOR.replace( 'Circumstances' );
</script>
<script>My JQuery Stuff Goes Here</script>
I need to update the hidden textarea with the data from the CKEditor instance while a user is typing or on blur. I would like to do this using JQuery if possible. My problem is that I don't know how to do it and I also don't know what the instance name of the CKEditor is for the textarea. I guessed it was the same as the ID for the textarea. So I tried this:
CKEDITOR.instances[Circumstances].on('blur', function(event) {
for(var Circumstances in CKEDITOR.instances)
CKEDITOR.instances[ExtenuatingCircumstances].updateElement();
}
But the above doesn't do anything for me. Any suggestions please??