Skip to content

lengnuan-v/yii2-editor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

yii2-editor

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 ...
    ]
]); ?>

Releases

No releases published

Packages

No packages published