xicath
(Xicath)
1
i manage to able load ckeditor in each row in cgriedview
in view i add this code
Yii::app()->clientScript->registerScriptFile('/internal/assets/jquery.js', 0);
Yii::app()->clientScript->registerScriptFile('/internal/assets/61cd1b9f/ckeditor.js', 2);
Yii::app()->clientScript->registerScriptFile('/internal/assets/61cd1b9f/adapters/jquery.js', 2);
Yii::app()->clientScript->registerScript('myeditor', "
$('.jquery_ckeditor').ckeditor();
");
//in colum grid
$this->widget('zii.widgets.grid.CGridView', array(
'id'=>'t-sistem-grid',
'dataProvider'=>$model->search(),
'filter'=>$model,
'columns'=>array(
array(
'filter'=>false,
'type'=>'raw',
'value'=>'"
<textarea class=\"jquery_ckeditor\" name=\"news[desk]\" id=\"news_$data->ID_News\">".$data->Deskripsi."</textarea>"',
),
)
ckeditor jquery load succesfully in every row and after ajaxupdate, sort column working too,
but ajax search not working. ![:o](http://www.yiiframework.com/forum/public/style_emoticons/default/ohmy.gif)
when i remove this line
Yii::app()->clientScript->registerScriptFile('/internal/assets/jquery.js', 0);
ajax search work again ckeditor loaded, but afterajax update or in next page, ck editor not loaded ?
any idea whats going on ? ![:blink:](http://www.yiiframework.com/forum/public/style_emoticons/default/blink.gif)
thanks you so much for any help
xicath
(Xicath)
2
help me, the deadline is coming ![](http://www.indowebster.web.id/images/smilies/onion-07.gif)
it throw js error like this
Error: $.param.querystring is not a function
if i look up to the error, it open jquery.yiigridview.js on line 143
options.url = $.param.querystring(options.url, options.data);
i alert() before error line, but got nothing. ??
i try this stuff to…
'beforeAjaxUpdate' => 'js:function(id, data) {jQuery("#myeditor").$(\'.jquery_ckeditor\').ckeditor()}',
'afterAjaxUpdate' => 'js:function(id, data) {jQuery("#myeditor").$(\'.jquery_ckeditor\').ckeditor()}',
and like this to…
'afterAjaxUpdate' => 'jQuery(\'#myeditor\').$(\'.jquery_ckeditor\').ckeditor()',
'beforeAjaxUpdate' => 'jQuery(\'#myeditor\').$(\'.jquery_ckeditor\').ckeditor()',
ckeditor loaded but ajax search still not work.
come on…
share litle to me. ![:lol:](http://www.yiiframework.com/forum/public/style_emoticons/default/laugh.gif)
xicath
(Xicath)
5
I found a solution … ![](http://www.indowebster.web.id/images/smilies/jeanovea/boong.gif)
Use Create and destroy editor instances for Ajax applications.
see this example when you download CKeditor
with this, ajax search form working like hell, including sorting, etc
and ckeditor load in other ajax page properly.
just a hint if someone have across this path… ![](http://www.indowebster.web.id/images/smilies/onion-106.gif)
chruizzy
(Chruizzy)
6
Hey, could you give me an example of your solution?
I’m having a similar issue here.
Thanks in advance,