| Recommend this page to a friend! | 
|  Download | 
| Info | Documentation |  Files |  Install with Composer |  Download | Reputation | Support forum | Blog | Links | 
| Ratings | Unique User Downloads | Download Rankings | ||||
| Not enough user ratings | Total: 58 | All time:  10,551 This week: 47  | ||||
| Version | License | PHP version | Categories | |||
| ckeditor 1.0.0 | Custom (specified... | 5 | HTML, PHP 5, Libraries | 
| Description | Author | |
| This package provides a plugin to Use the CKEditor to edit HTML in a form input in applications based on the CakePHP framework. Innovation Award | 
You can install this plugin into your CakePHP application using composer. This is a personal version of: https://github.com/CakeCoded/CkEditor with the possibility of choose the version and distribution.
The recommended way to install composer packages is:
composer require ebarrosjr/ckeditor
Then in config/bootstrap.php add:
Plugin::load('CkEditor');
In either src/Controller/AppController.php, or any controller where you want to use CKEditor, add:
public $helpers = ['CkEditor.Ck' => [
	'distribution' => 'full', // Default Option :: Others options => 'basic', 'standard'
	'version' => '4.11.4', //Default option, others via CDN page
	'script' => null // You can now point to a custom ckeditor JS file
]];
Finally, in your template file, simply add this to call CKEditor:
echo $this->Ck->input('field_name');
This is the equilivant of using
echo $this->Form->input('field_name');
Except that CKEditor will be loaded instead of a text area!
You can make adjustments to CKEditor and the form input as needed. There is full flexibility in this regard.
The full explaination is as follows:
echo $this->Form->input($input, $options, $ckEditorOptions, $ckEditorUrl);
@param string $input
The name of the field, can be field_name or model.field_name
@param array $options
Options include $options['label'] for a custom label and any other custom Form Helper options
@param array $ckEditorOptions
This will pass any options from http://docs.ckeditor.com/#!/guide/dev_configuration to CKEditor
@param string $ckEditorUrl
This gives an option to overwrite the CKEditor URL. You can use a local URL then if required.
Use an associated field name
echo $this->Ck->input('category.description');
Generate a custom label
echo $this->Ck->input('field_name', ['label' => 'A unique label']);
Add options to CKEditor from http://docs.ckeditor.com/#!/guide/dev_configuration
echo $this->Ck->input('field_name', [], ['fullPage' => true, 'allowedContent' => 'true']);
Load a local version of CKEditor, or a different version
echo $this->Ck->input('field_name', [], [], '/js/ckeditor.js');
Example showing all the options together
echo $this->Ck->input('field_name', ['label' => 'A unique label'], ['fullPage' => true, 'allowedContent' => 'true'], '/js/ckeditor.js');
|  Files (7) | 
| File | Role | Description | ||
|---|---|---|---|---|
|  src (1 directory) | ||||
|  tests (1 file, 1 directory) | ||||
|    composer.json | Data | Auxiliary data | ||
|    LICENSE | Lic. | License text | ||
|    phpunit.xml.dist | Data | Auxiliary data | ||
|    README.md | Doc. | Documentation | ||
|  Files (7) | / | tests | / | TestCase | / | View | / | Helper | 
| File | Role | Description | 
|---|---|---|
|  CKHelperTest.php | Class | Class source | 
| The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. | 
|  Install with Composer | 
| Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
| 100% | 
 | 
 | 
| Applications that use this package | 
 If you know an application of this package, send a message to the author to add a link here.
 If you know an application of this package, send a message to the author to add a link here.