2017 © Pedro Peláez
 

yii2-extension yii2-redactor

Extension redactor for Yii2.

image

dimd4/yii2-redactor

Extension redactor for Yii2.

  • Thursday, June 30, 2016
  • by dimd4
  • Repository
  • 1 Watchers
  • 2 Stars
  • 400 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 7 Versions
  • 2 % Grown

The README.md

yii2-redactor

Extension redactor for Yii2 Framework., (*1)

Installation

The preferred way to install this extension is through composer., (*2)

Either run, (*3)

php composer.phar require --prefer-dist dimd4/yii2-redactor "*"

or, (*4)

 "dimd4/yii2-redactor": "*"

to the require section of your composer.json., (*5)

Configure

Add to config file (config/web.php or common\config\main.php), (*6)

    'modules' => [
        'redactor' => 'yii\redactor\RedactorModule',
    ],

or if you want to change the upload directory. to path/to/uploadfolder default value @webroot/uploads, (*7)

    'modules' => [
        'redactor' => [
            'class' => 'yii\redactor\RedactorModule',
            'uploadDir' => '@webroot/path/to/uploadfolder',
            'uploadUrl' => '@web/path/to/uploadfolder',
            'imageAllowExtensions'=>['jpg','png','gif']
        ],
    ],

note: You need to create uploads folder and chmod and set security for folder upload, (*8)

Config view/form, (*9)

<?= $form->field($model, 'body')->widget(\yii\redactor\widgets\Redactor::className()) ?>

or not use ActiveField, (*10)

<?= \yii\redactor\widgets\Redactor::widget([
    'model' => $model,
    'attribute' => 'body'
]) ?>

or config advanced redactor reference Docs, (*11)

<?= $form->field($model, 'body')->widget(\yii\redactor\widgets\Redactor::className(), [
    'clientOptions' => [
        'imageManagerJson' => ['/redactor/upload/image-json'],
        'imageUpload' => ['/redactor/upload/image'],
        'fileUpload' => ['/redactor/upload/file'],
        'lang' => 'zh_cn',
        'plugins' => ['clips', 'fontcolor','imagemanager']
    ]
])?>

change default subfolder - optional, name subfolder only [a-zA-Z], (*12)

<?= $form->field($model, 'body')->widget(\yii\redactor\widgets\Redactor::className(), [
    'clientOptions' => [
        'imageManagerJson' => ['/redactor/upload/image-json', 'subfolder' => 'news'], 
        'imageUpload' => ['/redactor/upload/image', 'subfolder' => 'news'],
        'fileUpload' => ['/redactor/upload/file', 'subfolder' => 'news'],
        'lang' => 'zh_cn',
        'plugins' => ['clips', 'fontcolor','imagemanager']
    ]
])?>

Thanks!, (*13)

The Versions

30/06 2016

dev-master

9999999-dev

Extension redactor for Yii2.

  Sources   Download

MIT

The Requires

 

by Avatar dimd4

extension yii2 wysiwyg imperavi redactor html editor

30/06 2016

v1.0.5

1.0.5.0

Extension redactor for Yii2.

  Sources   Download

MIT

The Requires

 

by Avatar dimd4

extension yii2 wysiwyg imperavi redactor html editor

27/06 2016

v1.0.4

1.0.4.0

Extension redactor for Yii2.

  Sources   Download

MIT

The Requires

 

by Avatar dimd4

extension yii2 wysiwyg imperavi redactor html editor

27/06 2016

v1.0.3

1.0.3.0

Extension redactor for Yii2.

  Sources   Download

MIT

The Requires

 

by Avatar dimd4

extension yii2 wysiwyg imperavi redactor html editor

27/06 2016

v1.0.2

1.0.2.0

Extension redactor for Yii2.

  Sources   Download

MIT

The Requires

 

by Avatar dimd4

extension yii2 wysiwyg imperavi redactor html editor

27/06 2016

v1.0.1

1.0.1.0

Extension redactor for Yii2.

  Sources   Download

MIT

The Requires

 

by Avatar dimd4

extension yii2 wysiwyg imperavi redactor html editor

27/06 2016

v1.0

1.0.0.0

Extension redactor for Yii2.

  Sources   Download

MIT

The Requires

 

by Avatar dimd4

extension yii2 wysiwyg imperavi redactor html editor