Skip to content

Use your own CKEditor

Edit this page

The bundle is shipped with the latest CKEditor 4 full release. If you don't want to use it, the bundle allows you to use your own by defining it in your configuration file or in your widget.

Install your CKEditor

First of all, you need to download and extract your own CKEditor version in the public directory. For that, you have two possibilities:

  1. Directly put it in the web directory (/public/ckeditor/ for example).
  2. Put it in the /Resources/public/ directory of any of your bundles and install the assets.

Register your CKEditor

Then, to use your own CKEditor instead of the built-in, just need to register it in your configuration or in your widget:

1
2
3
4
# app/config/config.yml
fos_ck_editor:
    base_path: "ckeditor"
    js_path:   "ckeditor/ckeditor.js"
1
2
3
4
$builder->add('field', 'ckeditor', array(
    'base_path' => 'ckeditor',
    'js_path'   => 'ckeditor/ckeditor.js',
));

Note

Each path must be relative to the public directory.

This work, including the code samples, is licensed under a Creative Commons BY-SA 3.0 license.
TOC
    Version