kotchuprik/yii2-medium-widget

Medium editor widget for Yii2

Installs: 384

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 1

Forks: 0

Open Issues: 0

Language:JavaScript

Type:yii2-extension

1.1 2016-07-08 09:23 UTC

This package is not auto-updated.

Last update: 2021-04-30 22:30:57 UTC


README

This widget is the wrapper for the MediumEditor.

Usage

Widget

echo \kotchuprik\medium\Widget::widget([
    'model' => $model,
    'attribute' => 'attribute',
]);

Widget with settings

echo \kotchuprik\medium\Widget::widget([
    'model' => $model,
    'attribute' => 'attribute',
    'theme' => 'bootstrap',
    'settings' => [
        'buttons' => ['bold', 'italic', 'quote'],
    ],
]);

ActiveForm widget

echo $form->field($model, 'attribute')->widget(\kotchuprik\medium\Widget::className());

ActiveForm widget with settings

echo $form->field($model, 'attribute')->widget(\kotchuprik\medium\Widget::className(), [
    'theme' => 'bootstrap',
    'settings' => [
        'buttons' => ['bold', 'italic', 'quote'],
    ],
]);