主要是按照上面的链接来的
在composer.json中加入"kucha/ueditor": "*",
然后右键点击项目
![](http://dl2.iteye.com/upload/attachment/0122/2469/fa5ce2cc-cb56-35ac-ad73-6b9a6c5637b9.png)
然后找到kucha/ueditor,就可以下载了
在ActiveForm中写
<?= $form->field($model, 'Content')->widget(\kucha\ueditor\UEditor::className(), ['id' => 'content', 'name' => 'content', 'clientOptions' => [ //编辑区域大小 'initialFrameHeight' => '200',]]) ?>
controller
public function actions() { return [ 'upload' => [ 'class' => 'kucha\ueditor\UEditorAction', /*'config' => [ "imageUrlPrefix" => "http://localhost:8080",//图片访问路径前缀 "imagePathFormat" => "/upload/image/{yyyy}{mm}{dd}/{time}{rand:6}" //上传保存路径 ],*/ ] ]; }
![](http://dl2.iteye.com/upload/attachment/0122/2471/00eef445-0bf7-359d-8ae8-63f1fc0e8d04.png)