I'm pretty new to CKEditor, so be at least a little gentle.
I have a little javascript that updates a parent window readonly textarea when a form is submitted. It works good without CKEditor (just a plain textarea) but I'd like to use CKEditor so I can show formatting. How do I force CKEditor to reload? Here's the relevant code:
In child window (activated with a form submit):
function changeText(oform)
{
var record_id = (oform.elements["child_record_id"].value);
var record_txt = (oform.elements["child_purpose_txt"].value);
window.opener.document.input_form.purpose_of_eval_id.value = record_id;
window.opener.document.input_form.purpose_of_eval_txt.value = record_txt;
window.close();
}
In parent window (php):
$form .= " <p><textarea id=\"purpose_of_eval_txt\" name=\"purpose_of_eval_txt\" class=\"ckeditor\" cols=\"80\" rows=\"20\" disabled=\"disabled\">$purpose_of_eval_txt</textarea></p>\r";
$form .= " <script>\r";
$form .= " CKEDITOR.replace( 'purpose_of_eval_txt', { toolbar: [[ 'Maximize', '-']] } )\r";
$form .= " </script>\r";
$form .= " Purpose of Evaluation ID: <input type=\"text\" id=\"Purpose_of_Evaluation\" name=\"purpose_of_eval_id\" size=\"8\" value=\"$purpose_of_eval_id\" readonly=\"readonly\" />\r";