I wrote a custom function in ckeditor/ckeditor_php5.php:
[code]
/**
* Custom function for retrieving the data of the current editor instance
*
* @param string instance id
* @return string
*/
public function getData($id)
{
$js = "";
if (!$this->initialized) {
$js .= $this->init();
}
$js .= $this->returnGlobalEvents();
$script = "document.write('<div id=\"temp_zone\" style=\"display: none;\"></div>');"
. "$(document).ready(function(){"
. '$("input[type=\'submit\']").each(function(i, v){'
. "$('#' + v.id).click(function(){"
. "var data = CKEDITOR.instances.$id.getData();"
. "$('#temp_zone').html(data);"
. "});"
. "});"
. "});";
$js .= $this->script($script);
return $js;
}
[/code]
Then, where I intialize the ckeditor instance,
[code]
$ckeditor = new CKEditor();
$ckeditor->BasePath = 'somepath/ckeditor.php';
$input_str = "<$type id=\"$name\" name=\"$name\""
. " rows=\"$rows\" cols=\"$cols\">"
. "$values</$type>";
$input_str .= $ckeditor->editor($name, $values, $configs);
$input_str .= $ckeditor->getData($name);
[/code]
This feels extraordinarily hackish...but it works well.