yuncms/yuncms-summernote-widget

This package is abandoned and no longer maintained. No replacement package was suggested.

The summer note widget for yuncms.

Installs: 1 079

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Language:JavaScript

Type:yii2-extension

2.0.0 2017-11-14 10:47 UTC

This package is auto-updated.

Last update: 2022-07-09 17:24:01 UTC


README

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist yuncms/yuncms-summernote-widget "*"

or add

"yuncms/yuncms-summernote-widget": "*"

to the require section of your composer.json file.

Usage

<?php

namespace app\controllers;

use Yii;
use yii\web\Controller;
use yii\filters\AccessControl;

class MyController extends Controller
{

    /** @inheritdoc */
    public function behaviors()
    {
        return [
            'access' => [
                'class' => AccessControl::className(),
                'rules' => [
                    [
                        'allow' => true,
                        'actions' => [
                            'upload'
                        ],
                        'roles' => ['@'],
                    ],
                ],
            ],
        ];
    }

    public function actions()
    {
        return [
            'upload' => [
                'class' => 'yuncms\summernote\SummerNoteAction',
                //etc...
            ],
        ];
    }
}

Once the extension is installed, simply use it in your code by :

<?= $form->field($model, 'content')->widget(\yuncms\summernote\SummerNote::className(),[
	//etc...
]) ?>
<?= \yuncms\summernote\SummerNote::widget(); ?>