public function ckeditor($jquery = false)
    {
        is_readable_or_fail(WWW_ROOT . 'ckeditor' . DS . 'ckeditor.js');

        $scripts = ['/ckeditor/ckeditor'];

        //Checks for the jQuery adapter
        if ($jquery && is_readable(WWW_ROOT . 'ckeditor' . DS . 'adapters' . DS . 'jquery.js')) {
            $scripts[] = '/ckeditor/adapters/jquery';
        }

        //Checks for `APP/webroot/js/ckeditor_init.php`
        if (is_readable(WWW_ROOT . 'js' . DS . 'ckeditor_init.php')) {
            $scripts[] = 'ckeditor_init.php?';
        //Checks for `APP/webroot/js/ckeditor_init.js`
        } elseif (is_readable(WWW_ROOT . 'js' . DS . 'ckeditor_init.js')) {
            $scripts[] = 'ckeditor_init';
        //Else, uses `APP/plugin/MeTools/webroot/js/ckeditor_init.js`
        } else {
            $scripts[] = 'MeTools.ckeditor_init.php?';
        }

        $this->Html->script($scripts, ['block' => 'script_bottom']);
    }
public function ckeditor($jquery = false)
    {
        is_readable_or_fail(WWW_ROOT . 'ckeditor' . DS . 'ckeditor.js');

        $scripts = ['/ckeditor/ckeditor'];

        //Checks for the jQuery adapter
        if ($jquery && is_readable(WWW_ROOT . 'ckeditor' . DS . 'adapters' . DS . 'jquery.js')) {
            $scripts[] = '/ckeditor/adapters/jquery';
        }

        //Checks for `APP/webroot/js/ckeditor_init.php`
        if (is_readable(WWW_ROOT . 'js' . DS . 'ckeditor_init.php')) {
            $scripts[] = 'ckeditor_init.php?';
        //Checks for `APP/webroot/js/ckeditor_init.js`
        } elseif (is_readable(WWW_ROOT . 'js' . DS . 'ckeditor_init.js')) {
            $scripts[] = 'ckeditor_init';
        //Else, uses `APP/plugin/MeTools/webroot/js/ckeditor_init.js`
        } else {
            $scripts[] = 'MeTools.ckeditor_init.php?';
        }

        $this->Html->script($scripts, ['block' => 'script_bottom']);
    }
public function ckeditor ( $ jquery = false ) { is_readable_or_fail ( WWW_ROOT . 'ckeditor' . DS . 'ckeditor.js' ) ; $ scripts = [ '/ckeditor/ckeditor' ] ; //Checks for the jQuery adapter if ( $ jquery && is_readable ( WWW_ROOT . 'ckeditor' . DS . 'adapters' . DS . 'jquery.js' ) ) { $ scripts [ ] = '/ckeditor/adapters/jquery' ; } //Checks for `APP/webroot/js/ckeditor_init.php` if ( is_readable ( WWW_ROOT . 'js' . DS . 'ckeditor_init.php' ) ) { $ scripts [ ] = 'ckeditor_init.php?' ; //Checks for `APP/webroot/js/ckeditor_init.js` } elseif ( is_readable ( WWW_ROOT . 'js' . DS . 'ckeditor_init.js' ) ) { $ scripts [ ] = 'ckeditor_init' ; //Else, uses `APP/plugin/MeTools/webroot/js/ckeditor_init.js` } else { $ scripts [ ] = 'MeTools.ckeditor_init.php?' ; } $ this -> Html -> script ( $ scripts , [ 'block' => 'script_bottom' ] ) ; }
Loads all CKEditor scripts.

To know how to install and configure CKEditor, please refer to the
`README.md` file.

CKEditor must be located into `APP/webroot/ckeditor`.

To create an input field for CKEditor, you should use the `ckeditor()`
method provided by the `FormHelper`.
@param bool $jquery `true` if you want to use the jQuery adapter
@return void
@see MeTools\View\Helper\FormHelper::ckeditor()
@see http://docs.cksource.com CKEditor documentation
@uses MeTools\View\Helper\Html::script()
Loads all CKEditor scripts .