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
Requires
- bower-asset/summernote: 0.*
- yiisoft/yii2: ^2.0
This package is auto-updated.
Last update: 2025-04-29 01:01:34 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
]
]); ?>