I have a FORM with JS function for checking the value of some fields and, in particular, the value of the CKEditor field:
<form ... onSubmit='return(check_xxx());'>
Now, with FCKEditor, in order to get the value, I needed to do this:
var oEditor = FCKeditorAPI.GetInstance('field_name');
field_value = oEditor.GetHTML();
With CKEditor, I try to do this:
field_value = CKEDITOR.instances.editor1.getData('field_name');
but it's not working.
Somebody can help me? Thanks a lot in advance.
May be I have a solution ...
I discover that:
CKEDITOR.instances.editor1.getData('field_name') provides the previous value if the field_name;
CKEDITOR.instances.editor1.getData() provides the current value.
Is it correct ? How it's work when there are more than one CKEditor field in the form ?