Skip to content

artkost/yii2-trumbowyg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 "@stable"

or add

"artkost/yii2-trumbowyg": "@stable"

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\yii2\trumbowyg\Trumbowyg::widget([
    'name' => 'myname',
    'settings' => [
        'lang' => 'ru'
    ]
]);

Use as ActiveForm widget

use artkost\yii2\trumbowyg\Trumbowyg;

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