PHPackages                             xinyeweb/yii2-ueditor - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. xinyeweb/yii2-ueditor

ActiveYii2-extension

xinyeweb/yii2-ueditor
=====================

yii2-ueditor

151JavaScript

Since May 9Pushed 10y ago2 watchersCompare

[ Source](https://github.com/xinyeweb/yii2-ueditor)[ Packagist](https://packagist.org/packages/xinyeweb/yii2-ueditor)[ RSS](/packages/xinyeweb-yii2-ueditor/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

yii2-ueditor
============

[](#yii2-ueditor)

yii2-ueditor

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist xinyeweb/yii2-ueditor:dev-master

```

or add

```
"xinyeweb/yii2-ueditor": "dev-master"

```

to the require section of your `composer.json` file.

Usage
-----

[](#usage)

Once the extension is installed, simply use it in your code by :

```
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}" ,
            ]
        ]
    ];
}
```

使用：

```
