dev-master
9999999-devyii2-ueditor
BSD-3-Clause
The Requires
by XY Team - Hoter
extension yii2
Wallogit.com
2017 © Pedro Peláez
yii2-ueditor
yii2-ueditor, (*1)
The preferred way to install this extension is through composer., (*2)
Either run, (*3)
php composer.phar require --prefer-dist xinyeweb/yii2-ueditor:dev-master
or add, (*4)
"xinyeweb/yii2-ueditor": "dev-master"
to the require section of your composer.json file., (*5)
Once the extension is installed, simply use it in your code by :, (*6)
public function actions()
{
return [
'upload' => [
'class' => 'xinyeweb\ueditor\UEditorAction',
'config' => [
'imageRoot' => dirname(\Yii::$app->basePath).dirname(\Yii::getAlias('@web')). DIRECTORY_SEPARATOR . 'images_webroot',//圖片的根路径
//'imageUrlPrefix' => 'http://www.baidu.com',
//'imagePathFormat' => dirname(Yii::$app->basePath)."/upload/image/{yyyy}{mm}{dd}/{time}{rand:6}" ,
]
]
];
}
使用:, (*7)
<?= $form->field($model, 'description')->widget('\xinyeweb\ueditor\UEditor',[]) ?>
yii2-ueditor
BSD-3-Clause
extension yii2