need help with ckeditor-integration

Hai…

I’m a newbie in Yii… I’m so interest with http://www.yiiframework.com/extension/ckeditor-integration/

but I don’t understand about

$this->widget(‘ext.ckeditor.CKEditorWidget’,array(

"model"=>$pages, # Data-Model

“attribute”=>‘content’, # Attribute in the Data-Model

"defaultValue"=>"Test Text", # Optional

$pages << how to make it??? any tutorial to use this extension…

Thank master…

$page is a variable which is you ActiveRecord(you can use gii to generate it) or subclass of CFormModel

it should be the $model variable name ,





 $form->activeTextArea($model,'someAttributeName');


 //  you see this  is your normal usage ,  but here you want the textare to become some webEditor  

 // so  the CKEditorWidget comes 




:lol: you can read the CInputWidget doc CInputWidget to understand it .

this widget should be the subclass of CInputWidget

if this is an active record, so it must have a table?

So, how about "attribute"?

yes if it is a ar , you should have a table to map it . the attribute is the field of table . lets say you have a table blog:

blog(id,title,body,create_time,…) you want the ‘body’ to be a rich description text(html content) ,you may use a online text editor( like ckEditor , xhEditor,TinyMce etc…) .