Yii添加扩展加载Ckeditor 4.0以上版本
https://github.com/firsyura/yii-ckeditor
在需要使用编辑器的地方加入代码:
<tr>
<td width="150"><?php echo $form->labelEx($model,'content'); ?></td>
<td>
<?php
$this->widget('application.extensions.yii-ckeditor-master.CKEditorWidget', array(
'model' => $model,
'attribute' => 'content',
'config' => array(
'language' => 'zh-cn'
)
));
?>
<?php echo $form->error($model,'content'); ?>
</td>
</tr>
效果如下: