itstructure/yii2-ckeditor CKEditor widget for Yii2 Framework

Yii2 CKEditor widget ¶

  1. Introduction
  2. Dependencies
  3. Installation
  4. Usage
  5. License

Introduction ¶

Latest Stable Version Latest Unstable Version License Total Downloads Build Status Scrutinizer Code Quality

This is a CKEditor widget for the Yii2 framework with CKEditor template.

Dependencies ¶

  • php >= 7.1
  • composer

Installation ¶

Via composer:

composer require "itstructure/yii2-ckeditor": "~1.1.3"

or in section require of composer.json file set the following:

"require": {
    "itstructure/yii2-ckeditor": "~1.1.3"
}

and command composer install, if you install yii2 project extensions first,

or command composer update, if all yii2 project extensions are already installed.

Usage ¶

Example of using in application with an active model and ckfinder:

echo $this->form->field($this->model, $this->getFieldName())
    ->widget(
        CKEditor::className(),
        [
            'preset' => 'custom',
            'clientOptions' => [
                'toolbarGroups' => [
                    [
                        'name' => 'undo'
                    ],
                    [
                        'name' => 'basicstyles',
                        'groups' => ['basicstyles', 'cleanup']
                    ],
                    [
                        'name' => 'colors'
                    ],
                    [
                        'name' => 'links',
                        'groups' => ['links', 'insert']
                    ],
                    [
                        'name' => 'others',
                        'groups' => ['others', 'about']
                    ],
                ],
                'filebrowserBrowseUrl' => '/ckfinder/ckfinder.html',
                'filebrowserImageBrowseUrl' => '/ckfinder/ckfinder.html?type=Images',
                'filebrowserUploadUrl' => '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files',
                'filebrowserImageUploadUrl' => '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images',
                'filebrowserWindowWidth' => '1000',
                'filebrowserWindowHeight' => '700',
                'allowedContent' => true,
                'language' => 'en',
            ]
        ]
    );

preset option can be:

  • basic
  • full
  • standard

License ¶

Copyright © 2018-2020 Andrey Girnik girnikandrey@gmail.com.

Licensed under the MIT license. See LICENSE.txt for details.

0 0
1 follower
1 304 downloads
Yii Version: 2.0
License: MIT
Developed by: itstructure
Created on: Jun 23, 2020
Last updated: (not set)
Packagist Profile
Github Repository

Related Extensions