Skip to content

Latest commit

 

History

16 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yii2-summernote

The Summernote WYSIWYG-editor Yii-widget, with all included assets.

Latest Stable Version Total Downloads Latest Unstable Version License PHP Version Require

Widget example

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();

Working example

About

My Summernote WYSIWYG editor component with included assets and html-clean module.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages