Skip to content

Latest commit

 

History

History
52 lines (35 loc) · 882 Bytes

README.md

File metadata and controls

52 lines (35 loc) · 882 Bytes

The Trumbowyg WYSIWYG Editor widget for Yii 2

Wrapper for Trumbowyg WYSIWYG.

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist artkost/yii2-trumbowyg "*"

or add

"artkost/yii2-trumbowyg": "*"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply use it in your code:

Use as widget

echo \artkost\trumbowyg\Trumbowyg::widget([
    'settings' => [
        'lang' => 'ru'
    ]
]);

Use as ActiveForm widget

use artkost\trumbowyg\Trumbowyg;

echo $form->field($model, 'content')->widget(Trumbowyg::className(), [
    'settings' => [
        'lang' => 'ru'
    ]
]);