https://github.com/itstructure/yii2-ckeditor
CKEditor widget for Yii2 Framework
https://github.com/itstructure/yii2-ckeditor
ckeditor widget yii2
Last synced: about 1 year ago
JSON representation
CKEditor widget for Yii2 Framework
- Host: GitHub
- URL: https://github.com/itstructure/yii2-ckeditor
- Owner: itstructure
- License: mit
- Created: 2018-02-04T07:16:18.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-01-22T08:42:55.000Z (over 3 years ago)
- Last Synced: 2025-04-14T03:06:01.422Z (about 1 year ago)
- Topics: ckeditor, widget, yii2
- Language: PHP
- Homepage:
- Size: 12.7 KB
- Stars: 4
- Watchers: 0
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: changelog.md
- License: LICENSE
Awesome Lists containing this project
README
Yii2 CKEditor widget
==============
## Introduction
[](https://packagist.org/packages/itstructure/yii2-ckeditor)
[](https://packagist.org/packages/itstructure/yii2-ckeditor)
[](https://packagist.org/packages/itstructure/yii2-ckeditor)
[](https://packagist.org/packages/itstructure/yii2-ckeditor)
[](https://scrutinizer-ci.com/g/itstructure/yii2-ckeditor/build-status/master)
[](https://scrutinizer-ci.com/g/itstructure/yii2-ckeditor/?branch=master)
This is a **CKEditor** widget for the Yii2 framework with [CKEditor](http://docs.ckeditor.com/)
template.
## Dependencies
- php >= 7.1
- composer
## Installation
Via composer:
`composer require itstructure/yii2-ckeditor ~1.1.6`
or in section **require** of composer.json file set the following:
```json
"require": {
"itstructure/yii2-ckeditor": "~1.1.4"
}
```
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:
```php
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-2023 Andrey Girnik girnikandrey@gmail.com.
Licensed under the [MIT license](http://opensource.org/licenses/MIT). See LICENSE.txt for details.