Skip to content

weaverryan/sfCKEditorPlugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

##How to install:##

symfony plugin:install sfCKEditorPlugin

You need to create an autoload.yml in the project config directory. Assuming you've downloaded ckeditor and placed it in your web/ckeditor directory:

autoload:
  ckeditor:
    name:       ckeditor
    path:       %SF_WEB_DIR%/ckeditor
    recursive:  on

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

all:
  ckeditor:
    basePath:         '/ckeditor/'

##How to use:##

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

###Set CKEditor config param###

You can set config with the ckeditor object directly

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

Or:

[php]
$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:

[php]
$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.

Releases

No releases published

Packages

 
 
 

Languages