r39u1/yii2-summernote

Summernote editor widget for Yii2.

Installs: 5

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:yii2-extension

1.0.0 2019-09-29 18:02 UTC

This package is auto-updated.

Last update: 2024-05-29 04:22:27 UTC


README

Renders a Summernote widget.

Installation

Composer

The preferred way to install this extension is through Composer.

Either run

composer require r39u1/yii2-summernote

or add

"r39u1/yii2-summernote": "~1.0"

to the require section of your composer.json

Usage

<?= $form->field($model, 'content')->widget(SummernoteWidget::class, [
    'editorOptions' => [
        ...
    ]
]); ?>

or

<?= SummernoteWidget::widget([
    'name' => 'editor_id',
    'editorOptions' => [
        ...
    ]
]); ?>

See editorOptions

Example:

  <?= SummernoteWidget::widget([
        'name' => 'editor_id',
        'editorOptions' => [
            'height' => 300,    // set editor height
            'focus' => true     // set focus to editable area after initializing summernote
        ]
  ]); ?>