anxu/yii2-simditor

editor for yii2 framework

Installs: 20

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 1

Open Issues: 0

Type:yii2-extension

v0.0.3 2016-05-04 10:33 UTC

This package is auto-updated.

Last update: 2024-05-11 18:01:44 UTC


README

The preferred way to install this extension is through composer.

Either run

$ php composer.phar require  anxu/yii2-simditor "*"

or add

"anxu/yii2-simditor": "*"

to the require section of your composer.json file.

Usage

Like a widget

echo \anxu\Yii2Simditor::widget([
    'toolbarSet'=>[
        'toolbarHidden'=>false,
        'toolbar'=>[//default true
            'title',
            'bold',
            'italic',
            'underline',
            'strikethrough',
            'fontScale'
        ]
    ]
]);

Like an ActiveForm widget

use anxu\Yii2Simditor;
echo  $form->field($model, 'content')->widget(Yii2Simditor::classname(),[
    'toolbarSet'=>[
        'toolbarHidden'=>false,
        'toolbar'=>[//default true
            'title',
            'bold',
            'italic',
            'underline',
            'strikethrough',
            'fontScale'
        ]
    ]
]);

For other options, refer to this website http://simditor.tower.im/