2017 © Pedro Peláez
 

cakephp-plugin ckeditor

CkEditor plugin for CakePHP 3.x

image

cakecoded/ckeditor

CkEditor plugin for CakePHP 3.x

  • Monday, January 29, 2018
  • by MichaelHoughton
  • Repository
  • 2 Watchers
  • 7 Stars
  • 1,441 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 2 Open issues
  • 5 Versions
  • 11 % Grown

The README.md

CKEditor plugin for CakePHP

Installation

You can install this plugin into your CakePHP application using composer., (*1)

The recommended way to install composer packages is:, (*2)

composer require cakecoded/ckeditor

Then in config/bootstrap.php add:, (*3)

Plugin::load('CkEditor');

In either src/Controller/AppController.php, or any controller where you want to use CKEditor, add:, (*4)

public $helpers = ['CkEditor.Ck'];

Finally, in your template file, simply add this to call CKEditor:, (*5)

echo $this->Ck->input('field_name');

This is the equilivant of using, (*6)

echo $this->Form->input('field_name');

Except that CKEditor will be loaded instead of a text area!, (*7)

Advanced Options

You can make adjustments to CKEditor and the form input as needed. There is full flexibility in this regard., (*8)

The full explaination is as follows:, (*9)

echo $this->Form->input($input, $options, $ckEditorOptions, $ckEditorUrl, $ckEditorPlugins);

```php @param string $input, (*10)

The name of the field, can be field_name or model.field_name

```php
@param array $options

Options include $options['label'] for a custom label and any other custom Form Helper options, (*11)

@param array $ckEditorOptions

This will pass any options from http://docs.ckeditor.com/#!/guide/dev_configuration to CKEditor, (*12)

@param string $ckEditorUrl

This gives an option to overwrite the CKEditor URL. You can use a local URL then if required., (*13)

@param array $ckEditorPlugins

An array of locally installed CKEditor plugins to include, as one sub-array per plugin, in the format specified in the CKEditor documentation at https://docs.ckeditor.com/ckeditor4/latest/api/CKEDITOR_plugins.html#addExternal., (*14)

Examples

Use an associated field name, (*15)

echo $this->Ck->input('category.description');

Generate a custom label, (*16)

echo $this->Ck->input('field_name', ['label' => 'A unique label']);

Add options to CKEditor from http://docs.ckeditor.com/#!/guide/dev_configuration, (*17)

echo $this->Ck->input('field_name', [], ['fullPage' => true, 'allowedContent' => 'true']);

Load a local version of CKEditor, or a different version, (*18)

echo $this->Ck->input('field_name', [], [], '/js/ckeditor.js');

Load a locally installed CKEditor plugin, (*19)

echo $this->Ck->input('field_name', [], [], null, [['myplugin', '/ckplugins/myplugin/', 'myplugin.js']]);

Example showing all the options together, (*20)

echo $this->Ck->input('field_name', ['label' => 'A unique label'], ['fullPage' => true, 'allowedContent' => 'true'], '/js/ckeditor.js', [['myplugin', '/ckplugins/myplugin/', 'myplugin.js']]);

The Versions

29/01 2018

dev-master

9999999-dev

CkEditor plugin for CakePHP 3.x

  Sources   Download

The Requires

 

The Development Requires

20/12 2016

v1.0.2

1.0.2.0

CkEditor plugin for CakePHP 3.x

  Sources   Download

The Requires

 

The Development Requires

07/12 2016

v1.0.1

1.0.1.0

CkEditor plugin for CakePHP 3.x

  Sources   Download

The Requires

 

The Development Requires

06/11 2016

dev-develop

dev-develop

CkEditor plugin for CakePHP 3.x

  Sources   Download

The Requires

 

The Development Requires

06/11 2016

v1.0.0

1.0.0.0

CkEditor plugin for CakePHP 3.x

  Sources   Download

The Requires

 

The Development Requires