Hi. i would likt to be able to paste content into the editor window with java script.
i have code that does this for the normal textarea(working). but it fails with fck editor
$out .= "var txtObjContents = document.{$form_name}.{$form_message_field_name};\n ";
$out .= "txtObjContents.value = stripTags(eval('document.{$form_name}.contents_' + id + '.value'));\n";
i also have the code to work with htmlarea editor, but it is not compatible with new browsers
$out .= "var txtObjContents = document.{$form_name}.{$form_message_field_name};\n ";
$out .= "editor_setHTML('{$form_message_field_name}', eval('document.{$form_name}.contents_' + id + '.value'));\n";
could someone please help out on thisone ?
i have code that does this for the normal textarea(working). but it fails with fck editor
$out .= "var txtObjContents = document.{$form_name}.{$form_message_field_name};\n ";
$out .= "txtObjContents.value = stripTags(eval('document.{$form_name}.contents_' + id + '.value'));\n";
i also have the code to work with htmlarea editor, but it is not compatible with new browsers
$out .= "var txtObjContents = document.{$form_name}.{$form_message_field_name};\n ";
$out .= "editor_setHTML('{$form_message_field_name}', eval('document.{$form_name}.contents_' + id + '.value'));\n";
could someone please help out on thisone ?
Re: dynamic dontents
$out .= "var oEditor = FCKeditorAPI.GetInstance('{$form_message_field_name}');\n";
$out .= "oEditor.InsertHtml(eval('document.{$form_name}.contents_' + id + '.value')) ;\n";
well. the only problem now is that it keeps ading to the content. is it possible to either clear the field first ot simply replace the content completely ?