https://github.com/edofre/yii2-ckeditor
Simple widget to include ckeditor
https://github.com/edofre/yii2-ckeditor
Last synced: over 1 year ago
JSON representation
Simple widget to include ckeditor
- Host: GitHub
- URL: https://github.com/edofre/yii2-ckeditor
- Owner: Edofre
- License: mit
- Created: 2016-06-07T21:35:32.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2018-01-07T12:15:59.000Z (over 8 years ago)
- Last Synced: 2024-04-23T08:08:16.257Z (over 2 years ago)
- Language: PHP
- Size: 10.7 KB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGE.MD
- License: LICENSE.md
Awesome Lists containing this project
README
# Yii2 ckeditor widget
[](https://packagist.org/packages/edofre/yii2-ckeditor)
[](https://packagist.org/packages/edofre/yii2-ckeditor)
[](https://packagist.org/packages/edofre/yii2-ckeditor)
[](https://packagist.org/packages/edofre/yii2-ckeditor)
[](https://packagist.org/packages/edofre/yii2-ckeditor)
## Installation
The preferred way to install this extension is through [composer](http://getcomposer.org/download/).
To install, either run
```
$ php composer.phar require edofre/yii2-ckeditor "V1.0.2"
```
or add
```
"edofre/yii2-ckeditor": "V1.0.2"
```
to the ```require``` section of your `composer.json` file.
## Usage
### ActiveForm usage with a model
```php
= $form->field($model, 'body')->widget(\edofre\ckeditor\CKEditor::className(), [
'editorOptions' => [
'language' => 'nl',
],
]) ?>
```
### Usage without model
```php
= \edofre\ckeditor\CKEditor::widget([
'name' => 'content',
'editorOptions' => [
'height' => '400px',
],
]) ?>
```