lengnuan-v / yii2-editor
yii2 editor froala
Package info
github.com/lengnuan-v/yii2-editor
Language:CSS
Type:yii2-extension
pkg:composer/lengnuan-v/yii2-editor
dev-master
2021-09-02 09:39 UTC
Requires
- yiisoft/yii2: ~2.0.0
This package is auto-updated.
Last update: 2026-03-01 00:36:15 UTC
README
yii2 editor froala
Installation
The preferred way to install this extension is through composer.
Either run
composer require --prefer-dist lengnuan-v/yii2-editor "dev-master"
or add
"lengnuan-v/yii2-editor": "*"
to the require section of your composer.json file.
Usage
Once the extension is installed, simply use it in your code by :
<?= lengnuan\editor\EditorWidget::widget([ 'name' => 'content', 'options' => [ // html attributes 'id'=>'content' ], 'clientOptions' => [ 'toolbarInline'=> false, 'theme' =>'royal', //optional: dark, red, gray, royal 'language'=>'en_gb' // optional: ar, bs, cs, da, de, en_ca, en_gb, en_us ... ] ]); ?>
or use with a model:
<?= lengnuan\editor\EditorWidget::widget([ 'model' => $model, 'attribute' => 'content', 'options' => [ // html attributes 'id'=>'content' ], 'clientOptions' => [ 'toolbarInline' => false, 'theme' => 'royal', //optional: dark, red, gray, royal 'language' => 'en_gb' // optional: ar, bs, cs, da, de, en_ca, en_gb, en_us ... ] ]); ?>