in short:
i'm using Yii Framework
i have a one Ckeditor window on my page ( php/ yii framework - works fine)
when i hit a button, a new CKeditor window is being generated and shown through AJAX call
THE PROBLEM: this new CKEditor window correctly displays the text stored in the database BUT : when i hit "Save" (an ajax button generated together with the rest of the form) the values from this new CKeditor window will not save : CKeditor sends back the old values that it got from the database.
When i remove the Ckeditor and leave the plain <textarea>
: everything is ok so i know that the controller is fine.
Please, anybody went through something like this?
Sounds like a typical post-AJAX JS binding issue. :) There are a few possibilities for how to fix it, depending on what is going wrong.
This post in the Yii forum should be money for you, it's where I got most of these suggestions: http://www.yiiframework.com/forum/index.php?/topic/9341-ckeditor-widget-in-a-cactiveform/
'textarea' ('onclick'=>'CKEDITOR.instances.TEXTAREA_ID.updateElement()',
Good luck!
You can let CKEDITOR update the textarea before validating, and clientside/ajax validation will work as expected: