2017 © Pedro Peláez
 

library yii2-ueditor

UEditor for Yii2

image

flywi/yii2-ueditor

UEditor for Yii2

  • Friday, July 27, 2018
  • by Flywi
  • Repository
  • 0 Watchers
  • 0 Stars
  • 1 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

yii2-ueditor

UEditor for Yii2, (*1)

安装

推荐使用, (*2)

$ php composer.phar require flywi/yii2-ueditor "@dev"

或者将, (*3)

"flywi/yii2-ueditor": "@dev"

加入到composer.jsonrequire段中, (*4)

使用

main.php中加入, (*5)

    'modules' => [
        ....
               'editor' => [
                   'class' => \Flywi\Editor\module\Module::class,
                   'actionMap' => [
                      'uploadimage' => function(\yii\web\UploadedFile $file ,$config){
                         ...
                      }
                   ],
                   'editorConfig' => [
                       "imageActionName" => "uploadimage", /* 执行上传图片的action名称 */
                       "imageFieldName" => "upfileimage", /* 提交的图片表单名称 */
                       // 其他Ueditor后端配置
                   ],
               ]
    ],

ActiveForm中使用:, (*6)

...
echo $form->field($model, 'content')->widget(\Flywi\Editor\UEditor::class, [
    'id' => 'contentID',
    'config' => [
      // Ueditor的部分配置
      'serverUrl' => Url:to('..editor') // 对应于modules中editor的url
    ]
]);
...

直接使用:, (*7)

...
echo \Flywi\Editor\UEditor::widget([
        'name' => 'inputName',
        'id' => 'contentId',
        'config' => [
           // Ueditor的部分配置
             'serverUrl' => Url:to('..editor') // 对应于modules中editor的url
        ]
 ]);
...

其他

UEditor 配置参考, (*8)

The Versions

27/07 2018

dev-master

9999999-dev

UEditor for Yii2

  Sources   Download

The Requires

 

by Avatar Flywi

27/07 2018

v1.1

1.1.0.0

UEditor for Yii2

  Sources   Download

The Requires

 

by Avatar Flywi

27/07 2018

v1.0

1.0.0.0

UEditor for Yii2

  Sources   Download

The Requires

 

by Avatar Flywi