2017 © Pedro Peláez
 

yii2-extension yii2-knedlik-wysiwyg

The extension for using the Kendlik editor

image

delgus/yii2-knedlik-wysiwyg

The extension for using the Kendlik editor

  • Saturday, July 28, 2018
  • by Delgus
  • Repository
  • 0 Watchers
  • 0 Stars
  • 4 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Knedlik-wysiwyg

The extension for using the Kendlik editor, (*1)

Installation

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

Either run, (*3)

php composer.phar require --prefer-dist delgus/yii2-knedlik-wysiwyg=dev-master

or add, (*4)

"delgus/yii2-knedlik-wysiwyg": "dev-master"

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

Usage

Once the extension is installed, simply use it in your code by(properties 'name' and 'id' - required) :, (*6)

<?= \delgus\knedlik\Knedlik::widget(
                [
                    'name' => 'knedlick',
                    'id' => 'knedlick',
                    'clientOptions' => [
                        'lang' => 'ru',
                        'outside' => ['bold', 'italic'],
                        'style' => 'flat',
                    ],
                ]
            ) ?>

In ActiveForm:, (*7)

 <?= $form->field($model, 'subject')->widget(\delgus\knedlik\Knedlik::class,['id' => 'knedlick']) ?>

For upload images: - In view show property upload:, (*8)

 <?= \delgus\knedlik\Knedlik::widget(
                [
                    'name' => 'knedlick',
                    'id' => 'knedlick',
                    'clientOptions' => [
                       ...
                        'upload' => 'site/upload'
                        ...
                    ],
                ]
            ) ?>
  • In Controller:

public function behaviors() { return [ ... 'knedlik' => [ 'class' => DisableCsrfBehavior::classname(), 'actions' => ['upload'], ], ... ]; } public function actions() { return [ ... 'upload' => [ 'class' => KnedlikAction::class, 'uploadDir' => '/uploads' ], ... ]; }

Thank you), (*9)

The Versions

28/07 2018

dev-master

9999999-dev

The extension for using the Kendlik editor

  Sources   Download

MIT

The Requires

 

by Avatar Delgus

extension yii2 wysiwyg