FCKeditor and Ajax (and CakePHP)
2007-07-30 18:46:37-05
Desarrollo
The problem: The controller don't get the data in textarea because FCK changes textarea for an iframe. The solution is update the textarea content before submit.
I am using this helper in this way:
echo $html->textarea('Message/body', array("cols"=>30, "rows"=>10));
echo $fck->load('Message/body', 'Basic', 500, 200);
this is just to setup FCK, now the the ajax button
echo $ajax->submit('Send message', array("url" => "/admin/messages/general",
"update"=>"already",
"before" => "MyFCKObject.UpdateEditorFormValue();",
"loading" => "Element.show('charging');Element.hide('already')",
"complete" => "Element.hide('charging');Effect.Appear('already')"
));
in the bottom of your view file:
echo $fck->fckAjax();
Voila! You can see and example.
I am using this helper in this way:
echo $html->textarea('Message/body', array("cols"=>30, "rows"=>10));
echo $fck->load('Message/body', 'Basic', 500, 200);
this is just to setup FCK, now the the ajax button
echo $ajax->submit('Send message', array("url" => "/admin/messages/general",
"update"=>"already",
"before" => "MyFCKObject.UpdateEditorFormValue();",
"loading" => "Element.show('charging');Element.hide('already')",
"complete" => "Element.hide('charging');Effect.Appear('already')"
));
in the bottom of your view file:
echo $fck->fckAjax();
Voila! You can see and example.
Permalink: http://www.mononeurona.org/users/entry/aarkerio/664
Comentblogs:










