brussens/yii2-trumbowyg

Trumbowyg extension for YiiFramework 2.x.x

Installs: 5 628

Dependents: 1

Suggesters: 0

Security: 0

Stars: 5

Watchers: 2

Forks: 1

Open Issues: 1

Type:yii2-extension

1.0.0 2018-09-25 23:05 UTC

This package is auto-updated.

Last update: 2024-12-15 01:52:13 UTC


README

Latest Stable Version Total Downloads License

Install

Either run

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

or add

"brussens/yii2-trumbowyg": "*"

to the require section of your composer.json file.

Basic usage:

use brussens\yii2\extensions\trumbowyg\TrumbowygWidget;

echo $form->field($form, 'content')->widget(TrumbowygWidget::className());

Advanced usage

use brussens\yii2\extensions\trumbowyg\TrumbowygWidget;

echo $form->field($form, 'content')->widget(TrumbowygWidget::className(), [
    'clientOptions' => [
        'btns' => [
            ['viewHTML'],
            ['undo', 'redo'],
            ['table'],
            ['formatting'],
            ['strong', 'em', 'del'],
            ['link'],
            ['justifyLeft', 'justifyCenter', 'justifyRight', 'justifyFull'],
            ['unorderedList', 'orderedList'],
            ['removeformat'],
            ['fullscreen'],
            ['upload'],
        ]
    ],
    'plugins' => [
        TrumbowygWidget::PLUGIN_UPLOAD,
        TrumbowygWidget::PLUGIN_TABLE,
        TrumbowygWidget::PLUGIN_HISTORY
    ]
]);