mirocow/yii2-redactor

This package is not installable via Composer 1.x, please make sure you upgrade to Composer 2+. Read more about our Composer 1.x deprecation policy.

Extension redactor for Yii2 Framework.

Installs: 90

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 83

Open Issues: 0

Language:JavaScript

Type:yii2-extension

dev-master 2015-08-19 15:10 UTC

This package is auto-updated.

Last update: 2021-11-14 12:13:30 UTC


README

Latest Stable Version Total Downloads Latest Unstable Version

Installation

The preferred way to install this extension is through composer.

Add github repository

    "repositories": [
        {
            "type": "git",
            "url": "https://github.com/mirocow/yii2-redactor.git"
        }
    ]

and then

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

or add

"mirocow/yii2-redactor" : "*"

to the require section of your application's composer.json file.

Configurate

	'components' => [
        'redactor' => [
          'class' => 'yii\redactor\RedactorModule'
        ],
      ] 
        

Using

use yii\redactor\widgets\Redactor;

        <?= Redactor::widget(
          [
            'model' => $model,
            'attribute' => 'description',
            'options' => [
              'style' => 'width: 100%; height: 340px;',
            ],
            'clientOptions' => [
				        'imageManagerJson' => \yii\helpers\Html::url('/redactor/upload/imagejson'),
				        'imageUpload' => \yii\helpers\Html::url('/redactor/upload/image'),
				        'fileUpload' => \yii\helpers\Html::url('/redactor/upload/file'),
				        'lang' => 'en',
				        'plugins' => ['fontcolor', 'filemanager', 'imagemanager', 'table', 'undoredo'],
                		'placeholder' => 'Please add description',
            ],
          ]
        ); ?>