Skip to content

sanchezzzhak/kak-ckeditor

Repository files navigation

Yii2 ckeditor widget

Yii2 ckeditor widget.

Installation

Composer

The preferred way to install this extension is through Composer.

Either run

php composer.phar require kak/ckeditor "dev-master"

or add

"kak/ckeditor": "dev-master"

to the require section of your composer.json

Usage

	<?= $form->field($model, 'content')->widget(kak\widgets\ckeditor\CKEditor::className(), [
		'clientOptions' => [
			...
		]
	]) ?>

or

	<?= kak\widgets\ckeditor\CKEditor::widget([
		'name' => 'editor_id',
		'clientOptions' => [
			...
		]
	]) ?>

See clientOptions

##Configuration Browser plugin (File browser for ckeditor) add section array to file config\params.php

//...
      'ckeditor' => [
            'browser' => [
                'url' => ['site/browser'], 
                'dirs' => [ 
                    'web dir ' => '@webroot'   // allow dirs
                ],
            ]
        ]
//...      

Create method the SiteController

    public function actions()
    {
        return [
            'browser' => [
                'class' => '\kak\widgets\ckeditor\actions\Browser',
            ],
        ];
    }

About

Summernote for Yii2

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published