floor12 / yii2-summernote
This Yii2 component helps to organize page title, meta tags and `og` and `twitter` open graph tags in with a fiew lines of code.
Installs: 8 163
Dependents: 2
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 4
Open Issues: 2
Language:JavaScript
Type:yii2-component
Requires
- php: >=7.1.0
- yiisoft/yii2: ~2.0.13
Requires (Dev)
- phpunit/phpunit: 4.*
This package is auto-updated.
Last update: 2024-12-07 21:01:10 UTC
README
The Summernote WYSIWYG-editor Yii-widget, with all included assets.
Installation
Install the widget via composer: Execute the command
$ composer require floor12/yii2-summernote
Usage
The simplest example:
use floor12\summernote\Summernote; echo Summernote::widget(['name' => 'some_field'])
TheActiveForm
and ActiveRecord
model example:
$form = ActiveForm::begin(); echo $form->field($model, 'content_ru') ->widget(Summernote::class); ActiveForm::end();
An example of integrating with my files module to intercept editors uploads, save them separately and then use in the editor.
$form = ActiveForm::begin(); echo $form->field($model, 'content_ru') ->widget(Summernote::class, [ 'fileField' => 'imagesDesktop', 'fileModelClass' => $model::class ]); echo $form->field($model, 'imagesDesktop') ->widget(FileInputWidget::class); ActiveForm::end();