Skip to content

Latest commit

 

History

History
44 lines (37 loc) · 1.17 KB

integrate-fos-ckeditor.md

File metadata and controls

44 lines (37 loc) · 1.17 KB

How to integrate FileManagerBundle into FOSCKEditorBundle

FOSCKEditorBundle Installation

Step 1 - Create your artgris_file_manager conf:

artgris_file_manager:
    conf:
        files:
          dir: "%kernel.project_dir%/public/uploads"
          type: 'file'
        images:
          dir: "%kernel.project_dir%/public/uploads"
          type: 'image'

Step 2 - Add fos_ck_editor conf:

fos_ck_editor:
    default_config: basic_config
    configs:
        basic_config:
            toolbar: full
            filebrowserBrowseRoute: file_manager
            filebrowserBrowseRouteParameters:
                conf: files
                module: ckeditor
            filebrowserImageBrowseRoute: file_manager
            filebrowserImageBrowseRouteParameters:
                conf: images
                module: ckeditor

Step 3 - Add a new field

    use FOS\CKEditorBundle\Form\Type\CKEditorType;

    $builder->add('ckeditor', CKEditorType::class, array(
        'config_name' => 'basic_config',
    ));