Skip to content
  • About
    • What is Symfony?
    • Community
    • News
    • Contributing
    • Support
  • Documentation
    • Symfony Docs
    • Symfony Book
    • Screencasts
    • Symfony Bundles
    • Symfony Cloud
    • Training
  • Services
    • Platform.sh for Symfony Best platform to deploy Symfony apps
    • SymfonyInsight Automatic quality checks for your apps
    • Symfony Certification Prove your knowledge and boost your career
    • SensioLabs Professional services to help you with Symfony
    • Blackfire Profile and monitor performance of your apps
  • Other
  • Blog
  • Download
sponsored by
  1. Home
  2. Documentation
  3. Bundles
  4. FOSCKEditorBundle
  5. CKEditor Installation

CKEditor Installation

Edit this page

The CKEditor source is not shipped with the bundle due to license restriction (GPL, LGPL and MPL) whereas the bundle relies on the MIT one which are not compatible together. To install CKEditor source, you can use the built-in Symfony command.

Composer Script

The easiest way to manage CKEditor installation and update is to integrate it at the middle of your composer routine (after the cache clear but before the assets installation).

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{
    "scripts": {
        "auto-scripts": {
            "cache:clear": "symfony-cmd",
            "ckeditor:install --clear=drop": "symfony-cmd",
            "assets:install --symlink --relative %PUBLIC_DIR%": "symfony-cmd"
        },
        "post-install-cmd": [
            "@auto-scripts"
        ],
        "post-update-cmd": [
            "@auto-scripts"
        ]
    }
}

Symfony Command

1
$ php bin/console ckeditor:install

By default, the command downloads the latest CKEditor full release (samples directory excluded) in the Resource/public directory of the bundle. Most of the time, this is exactly what you want but the command allows you to do more.

Download Path

If you don't want to download CKEditor in the Resource/public directory of the bundle, you can use a custom path (absolute):

1
$ php bin/console ckeditor:install /var/www/html/web/ckeditor

CKEditor Release

You can choose which CKEditor release (full, standard or basic) to download:

1
$ php bin/console ckeditor:install --release=basic

CKEditor Custom Build

It's also possible to use custom build generated using CKEditor online builder: https://ckeditor.com/cke4/builder. Download ZIP archive from CKEditor website and use your custom build ID from `build-config.js` file:

1
$ php bin/console ckeditor:install --release=custom --custom-build-id=574a82a0d3e9226d94b0e91d10eaa372

CKEditor Version

If your want a specific CKEditor version, you can use:

1
$ php bin/console ckeditor:install --tag=4.6.0

Silence Progress bars

While downloading files necessary for the install, a progress bar will be shown by default, if you would prefer hiding it, use:

1
$ php bin/console ckeditor:install --no-progress-bar

Clear Previous Installation

By default, the command will ask you what to do when there is a previous CKEditor installation detected but in non interactive mode, you can control automatically how to handle such case:

1
2
3
4
5
6
7
$ php bin/console ckeditor:install --clear=drop
   $ php bin/console ckeditor:install --clear=keep
   $ php bin/console ckeditor:install --clear=skip

- ``drop``: Drop the previous installation & install.
- ``keep``: Keep the previous installation & install by overriding files.
- ``skip``: Keep the previous installation & skip install.

Path Exclusion

When extracting the downloaded CKEditor ZIP archive, you can exclude paths such as samples, adapters, whatever:

1
$ php bin/console ckeditor:install --exclude=samples --exclude=adapters

Proxy

If you're using a proxy, you can use the following environment variables:

1
2
$ export HTTP_PROXY=http://127.0.0.1:8080
$ export HTTPS_PROXY=http://127.0.0.1:8080

You can also define if the request URI should be full with:

1
2
$ export HTTP_PROXY_REQUEST_FULLURI=true
$ export HTTPS_PROXY_REQUEST_FULLURI=true

Reminder

The command has been well documented, if you want to check it out:

1
$ php bin/console ckeditor:install --help
This work, including the code samples, is licensed under a Creative Commons BY-SA 3.0 license.
TOC
    Version
    Symfony Code Performance Profiling

    Symfony Code Performance Profiling

    Show your Symfony expertise

    Show your Symfony expertise

    Version:

    Table of Contents

    • Composer Script
    • Symfony Command
      • Download Path
      • CKEditor Release
      • CKEditor Custom Build
      • CKEditor Version
      • Silence Progress bars
      • Clear Previous Installation
      • Path Exclusion
      • Proxy
      • Reminder

    Symfony footer

    Avatar of iarro, a Symfony contributor

    Thanks iarro for being a Symfony contributor

    1 commit • 6 lines changed

    View all contributors that help us make Symfony

    Become a Symfony contributor

    Be an active part of the community and contribute ideas, code and bug fixes. Both experts and newcomers are welcome.

    Learn how to contribute

    Symfony™ is a trademark of Symfony SAS. All rights reserved.

    • What is Symfony?

      • What is Symfony?
      • Symfony at a Glance
      • Symfony Components
      • Symfony Releases
      • Security Policy
      • Logo & Screenshots
      • Trademark & Licenses
      • symfony1 Legacy
    • Learn Symfony

      • Symfony Docs
      • Symfony Book
      • Reference
      • Bundles
      • Best Practices
      • Training
      • eLearning Platform
      • Certification
    • Screencasts

      • Learn Symfony
      • Learn PHP
      • Learn JavaScript
      • Learn Drupal
      • Learn RESTful APIs
    • Community

      • Symfony Community
      • SymfonyConnect
      • Events & Meetups
      • Projects using Symfony
      • Contributors
      • Symfony Jobs
      • Backers
      • Code of Conduct
      • Downloads Stats
      • Support
    • Blog

      • All Blog Posts
      • A Week of Symfony
      • Case Studies
      • Cloud
      • Community
      • Conferences
      • Diversity
      • Living on the edge
      • Releases
      • Security Advisories
      • Symfony Insight
      • Twig
      • SensioLabs Blog
    • Services

      • SensioLabs services
      • Train developers
      • Manage your project quality
      • Improve your project performance
      • Host Symfony projects

      Powered by

    Follow Symfony