sfCKEditorPlugin - 0.1.2

A CKEditor Plugin

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to the Plugins Home

Signin


Forgot your password?
Create an account

Tools

Stats

advanced search
Information Readme Releases Changelog Contribute
Show source

How to install:

symfony plugin:install sfCKEditorPlugin

You need to create an autoload.yml in the project config directory.

autoload:
  ckeditor:
    name:       ckeditor
    path:       path/to/ckeditor/dir
    recursive:  on

You need to set the basePath of the ckeditor in an app.yml.

all:
  ckeditor:
    basePath:         'path/to/ckeditor/'

How to use:

$this->widgetSchema['my_editor'] = new sfWidgetFormCKEditor();

Set CKEditor config param

You can set config with the ckeditor object directly

$this->widgetSchema['my_editor'] = new sfWidgetFormCKEditor();
$editor = $this->widgetSchema['my_editor']->getEditor();
$editor->config['param'] = value;

Or:

$this->widgetSchema['my_editor'] = new sfWidgetFormCKEditor(array('jsoptions'=>array('param' => 'value'));

See http://ckeditor.com/ for config instructions

To use CKFinder:

Add in the autoload.yml file

ckfinder:
  name:       ckfinder
  path:       path/to/ckfinder/dir
  recursive:  on    

In app.yml:

all:
  ckfinder:
    active:           true
    basePath:         'path/to/ckfinder/'

Access to CKFinder object:

$this->widgetSchema['my_editor'] = new sfWidgetFormCKEditor();
$finder = $this->widgetSchema['my_editor']->getFinder();

You need to configure path/to/ckfinder/config.php. See http://ckfinder.com/ for instructions.