PHPackages                             funayaki/ckeditor - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. funayaki/ckeditor

ActiveCakephp-plugin[Utility &amp; Helpers](/categories/utility)

funayaki/ckeditor
=================

AkkaCKEditor plugin for CakePHP

13.3k1HTML

Since Oct 5Pushed 7y ago1 watchersCompare

[ Source](https://github.com/funayaki/AKKA-CakePHP-CKEditor-Plugin)[ Packagist](https://packagist.org/packages/funayaki/ckeditor)[ RSS](/packages/funayaki-ckeditor/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

CakePHP 3 CKEditor Plugin
=========================

[](#cakephp-3-ckeditor-plugin)

A CakePHP 3.x Plugin to allow the integration of CKEditor into an application.

[![Total Downloads](https://camo.githubusercontent.com/d9163e1981b402c6f2ce230042080bf95a951f6567a2eb35927ed58d4231a5cd/68747470733a2f2f706f7365722e707567782e6f72672f616b6b617765622f63616b657068702d636b656469746f722f646f776e6c6f6164732e737667)](https://packagist.org/packages/akkaweb/cakephp-ckeditor)[![License](https://camo.githubusercontent.com/ef74e2475ba7801ce2b1fd8d32af1873757528d9a2bc251472f264bc562a4f3c/68747470733a2f2f706f7365722e707567782e6f72672f616b6b617765622f63616b657068702d636b656469746f722f6c6963656e73652e737667)](https://packagist.org/packages/akkaweb/cakephp-ckeditor)

Requirements
------------

[](#requirements)

- CakePHP 3.x
- PHP 5.4.6+
- CKEditor - Auto-loaded by this Helper using CKEditor's CDN

Included
--------

[](#included)

- CKEditor Helper

Installation
------------

[](#installation)

##### Composer (Best Choice)

[](#composer-best-choice)

- Add the following to your `composer.json` located in the root of your application, in the `require` section . ie. `/var/www/domain.com/composer.json`

```
"require": {
	"funayaki/ckeditor": "dev-master"
}
```

- Run the following at the root of your application

```
sudo php composer.phar update
```

Note: if `composer.phar` is not found, you need to install it. Follow CakePHP's documentation here -&gt; . Refer to Installing Cakephp section

##### Git Clone

[](#git-clone)

`git clone git@github.com:akkaweb/AKKA-CakePHP-CKEditor-Plugin.git`

##### Download

[](#download)

`https://github.com/akkaweb/AKKA-CakePHP-CKEditor-Plugin/archive/master.zip`

Note: When installing with either manual download or Git Clone and CakePHP complains it cannot find the plugin, you need to add the plugin to `vendor/cakephp-plugins.php` in the `plugins` array \[\] --&gt; `'AkkaCKEditor' => $baseDir . '/plugins/AkkaCKEditor/'`. If you are using composer, running `php composer.phar dumpautoload` could be sufficient. If it does not work add the following to the `"autoload"` section in the root application's `composer.json` file in the `"psr-4":` section: `"AkkaCKEditor\\": "./plugins/AkkaCKEditor/src"`

Configuration
-------------

[](#configuration)

- Load the plugin in your application's `bootstrap.php` file:

```
Plugin::load('AkkaCKEditor', ['bootstrap' => false, 'routes' => true]);
```

- Load the plugin's Helper in `AppController.php`

```
class AppController extends Controller{
    public $helpers = ['AkkaCKEditor.CKEditor'];

}
```

- Optionally you are able to choose the Version and Distribution of the CKEditor to be loaded. See more details at

```
class AppController extends Controller {
	public $helpers = ['AkkaCKEditor.CKEditor' => [
		'distribution' => 'full', // Default Option / Other options => 'basic', 'standard'
		'editor_config' => [] // Default Option / Other options https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html
	]];
}
```

Usage
-----

[](#usage)

##### Helper Template File Setup

[](#helper-template-file-setup)

- Add `` inside the application `default.ctp` file right before `` tag. This will allow CKEditor to be available througout the application. It can also be loaded inside the template file as the first line or before the `textarea` where you want to apply the CKEditor.

##### CKEditor.replace

[](#ckeditorreplace)

Insert the following code immediately after the textarea you want CKEditor applied

```
// replace(field-name)  -> replace takes field_name and can be used multiple times throughout your application
