Skip to content

SObS/yii2-redactor

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 

Repository files navigation

yii2-redactor

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',
            ],
          ]
        ); ?>	

About

Extension Redactor WYSIWYG for Yii2 framework

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 82.5%
  • CSS 14.3%
  • PHP 3.2%