aprsoft/yii2-baidu-ueditor

yii2 ueditor extension

Installs: 33

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

Language:JavaScript

Type:yii2-extension

1.1.3 2017-04-19 03:40 UTC

This package is not auto-updated.

Last update: 2025-03-02 05:25:31 UTC


README

yii2 ueditor extension

Installation

The preferred way to install this extension is through composer.

Either run

composer require --prefer-dist aprsoft/yii2-baidu-ueditor "*"

or add

"aprsoft/yii2-baidu-ueditor": "*"

to the require section of your composer.json file.

Usage

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

<?= \AprSoft\UEditor\UEditor::widget(); ?>

or

<?= $form->field($model, 'body')->widget(\AprSoft\UEditor\UEditor::className()) ?>

config upload

public function actions()
{
    return [
        'upload' => [
            'class' => 'AprSoft\UEditor\UEditorAction',
            'config' => [
                "imageUrlPrefix"  => "http://www.baidu.com",//图片访问路径前缀
                "imagePathFormat" => "/upload/image/{yyyy}{mm}{dd}/{time}{rand:6}", //上传保存路径
                "imageRoot" => Yii::getAlias("@webroot"),
            ],
        ]
    ];
}