lengnuan-v / yii2-editor
yii2 editor froala
Installs: 4
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Language:CSS
Type:yii2-extension
Requires
- yiisoft/yii2: ~2.0.0
This package is auto-updated.
Last update: 2024-05-29 05:20:48 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 ... ] ]); ?>