ailiangkuai/yii2-ueditor

ueditor的Yii2扩展小部件

1.0.1 2017-08-15 08:04 UTC

This package is not auto-updated.

Last update: 2024-09-29 05:01:26 UTC


README

该扩展基于Yii2.0

安装

配置config文件路径

首先配置UEditor的配置文件

return [
    'components' => [
        'assetManager' => [
            'assetMap' => [
                'ueditor.config.js' => '@web/js/ueditor.config.js', // 具体的存放路径参照项目定义
            ],
        ],
    ],
];

使用

$form = ActiveForm::begin();
echo $form->field($model, 'content')->widget(['class' => UEditor::className(), 'ueditorAction' => '后端请求,包括上传等']);
$form->end();