lubobill1990/yii2-simditor

editor for yii2 framework

Installs: 63

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 1

Language:JavaScript

Type:yii2-extension

v0.0.6 2018-04-18 09:11 UTC

This package is auto-updated.

Last update: 2024-10-29 05:46:34 UTC


README

The preferred way to install this extension is through composer.

Either run

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

or add

"lubobill1990/yii2-simditor": "*"

to the require section of your composer.json file.

Usage

Like a widget

echo \lubobill1990\yii2\widget\Simditor::widget([
    'clientOptions'=>[
        'toolbarHidden' => false,
        'toolbar' => [//default true
            'title',
            'bold',
            'italic',
            'underline',
            'strikethrough',
            'fontScale'
        ]
    ]
]);

Like an ActiveForm widget

use lubobill1990\yii2\widget\Simditor;
echo $form->field($model, 'content')->widget(Simditor::class,[
    'clientOptions'=>[
        'toolbarHidden'=>false,
        'toolbar'=>[//default true
            'title',
            'bold',
            'italic',
            'underline',
            'strikethrough',
            'fontScale'
        ]
    ]
]);

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

Claim

This package is forked from anxu/yii2-simditor