qiuch87
- qiuch87 2017-11-27 已签到连续签到540天,获得了20个金钱
- qiuch87 2017-11-26 已签到连续签到539天,获得了20个金钱
- qiuch87 2017-11-25 已签到连续签到538天,获得了20个金钱
- qiuch87 2017-11-24 已签到连续签到537天,获得了20个金钱
ueditor插件的使用,能不能普及一下,谢谢
controller
` <?php
class BusinessController extends BaseController
{public function actions() { return [ 'upload'=>[ 'class'=>'kucha\ueditor\UEditorAction' ] ]; } public function actionAdd() { $model = $this->findModel(0); if(Yii::$app->request->isPost){ $data = Yii::$app->request->post('Business'); if($this->saveRow($model,$data)){ $this->success('操作成功',$this->getForward()); }else{ $this->error('操作错误'); } } $model->loadDefaultValues(); //$model->pid = Yii::$app->request->get('pid',0); return $this->render('create',[ 'model'=>$model ]); }?>`
views
`<?= $form->field($model, 'content')->widget('kucha\ueditor\UEditor',['clientOptions' => [ 'serverUrl' => Url::to(['public/ueditor']),//确保serverUrl正确指向后端地址 'lang' =>'zh-cn', //中文为 zh-cn 'initialFrameWidth' => '100%', 'initialFrameHeight' => '400', //定制菜单,参考http://fex.baidu.com/ueditor/#start-toolbar 'toolbars' => [ [ 'fullscreen', 'source', 'undo', 'redo', '|', 'fontsize', 'bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', '|', 'lineheight', '|', 'indent', '|', ], ['preview','simpleupload','insertimage','link','emotion','map','insertvideo','insertcode',] ] ]
],['class'=>'c-md-7'])->label('商家介绍'); ?>`
@e282486518 谢谢很感谢
- qiuch87 2017-11-23 已签到连续签到536天,获得了20个金钱
- qiuch87 2017-11-22 已签到连续签到535天,获得了20个金钱
ueditor插件的使用,能不能普及一下,谢谢
controller
` <?php
class BusinessController extends BaseController
{public function actions() { return [ 'upload'=>[ 'class'=>'kucha\ueditor\UEditorAction' ] ]; } public function actionAdd() { $model = $this->findModel(0); if(Yii::$app->request->isPost){ $data = Yii::$app->request->post('Business'); if($this->saveRow($model,$data)){ $this->success('操作成功',$this->getForward()); }else{ $this->error('操作错误'); } } $model->loadDefaultValues(); //$model->pid = Yii::$app->request->get('pid',0); return $this->render('create',[ 'model'=>$model ]); }?>`
views
`<?= $form->field($model, 'content')->widget('kucha\ueditor\UEditor',['clientOptions' => [ 'serverUrl' => Url::to(['public/ueditor']),//确保serverUrl正确指向后端地址 'lang' =>'zh-cn', //中文为 zh-cn 'initialFrameWidth' => '100%', 'initialFrameHeight' => '400', //定制菜单,参考http://fex.baidu.com/ueditor/#start-toolbar 'toolbars' => [ [ 'fullscreen', 'source', 'undo', 'redo', '|', 'fontsize', 'bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', '|', 'lineheight', '|', 'indent', '|', ], ['preview','simpleupload','insertimage','link','emotion','map','insertvideo','insertcode',] ] ]
],['class'=>'c-md-7'])->label('商家介绍'); ?>`
@e282486518 谢谢,麻烦您更新后,告诉我一声吧,我正用您的框架写一个项目
- qiuch87 2017-11-21 已签到连续签到534天,获得了20个金钱
- qiuch87 2017-11-20 已签到连续签到533天,获得了20个金钱