dev-master
9999999-devUeditor for Yii2
MIT
The Requires
- php >=5.3.0
- yiisoft/yii2 *
by macle
yii2 ueditor
Ueditor for Yii2
Yii2 Ueditor, (*1)
The preferred way to install this extension is through composer., (*2)
Either run, (*3)
composer require --prefer-dist maclechan/yii2-ueditor "*"
or add, (*4)
"maclechan/yii2-ueditor": "*"
to the require section of your composer.json
file., (*5)
then add, (*6)
'macle\\ueditor\\' => array($vendorDir . '/maclechan/yii2-ueditor'),
to the return array of your composer/autoload_psr4.php
file, (*7)
notes: all of the files in the vendor/maclechan/yii2-ueditor/
, (*8)
Once the extension is installed, simply use it in your code by :, (*9)
view, (*10)
"Test[content]", 'events' => [ //编辑区域大小 //'initialFrameHeight' => '4800', //设置语言 'lang' =>'en', //中文为 zh-cn //定制菜单 'toolbars' => [ [ 'fullscreen', 'source', 'undo', 'redo', '|', 'fontsize', 'bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', '|', 'lineheight', '|', 'indent', '|' ], ], ], 'ucontent'=>$model->content, ]); ?> or = $form->field($model, 'content')->widget('macle\ueditor\Ueditor',['id'=>'Test[content]']); ?> //在编辑时,显示默认值 = $form->field($model, 'content')->widget('macle\ueditor\Ueditor',['id'=>'Test[content]','ucontent'=>$model->content])->label(false); ?>
email maclechan@qq.com qq 429140141, (*11)
Ueditor for Yii2
MIT
yii2 ueditor