Yii 2 widget for Froala Wysiwyg editor. The editor is free for non-commercial projects. For commercial applications you have to purchase a license from
PHP
Latest commit 4354b76 Dec 9, 2016 @stefanneculai stefanneculai Update to 2.4.0.
Permalink
Failed to load latest commit information.
FroalaEditorAsset.php
FroalaEditorWidget.php Add iframeStyleFiles to initClientOptions Jul 12, 2016
README.md
composer.json

README.md

Yii Framework Froala WYSIWYG HTML Editor

Yii 2 widget for Froala Wysiwyg editor.

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist froala/yii2-froala-editor "*"

or add

"froala/yii2-froala-editor": "dev-master"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply use it in your code by :

<?php echo froala\froalaeditor\FroalaEditorWidget::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:

<?php echo froala\froalaeditor\FroalaEditorWidget::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 ...
    ]
]);; ?>

For full details on usage, see the documentation.

License

This package is available under MIT License. However, Froala editor requires purchasing a license from https://www.froala.com/wysiwyg-editor/pricing.