FriendsOfSymfony / FOSCKEditorBundle

Provides a CKEditor integration for your Symfony project.
Other
518 stars 83 forks source link

Add support for custom builds #183

Closed TomaszGasior closed 5 years ago

TomaszGasior commented 5 years ago
Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Fixed tickets https://github.com/FriendsOfSymfony/FOSCKEditorBundle/issues/180
License MIT

This PR adds support for custom builds from https://ckeditor.com/cke4/builder to ckeditor:install console command. Usage:

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

To use this feature go to https://ckeditor.com/cke4/builder, generate your own build, download it and get your custom build ID from build-config.js file.

kunicmarko20 commented 5 years ago

@ElectricMaxxx got time to review or should I just merge it?

kunicmarko20 commented 5 years ago

Thank you @TomaszGasior!

kunicmarko20 commented 5 years ago

https://github.com/FriendsOfSymfony/FOSCKEditorBundle/releases/tag/2.1.0 just tagged 2.1

mattchete commented 4 years ago

Hi and thanks for this great feature :) Do you know the best way to integrate this call in a deploy ? Right now I have added a post-install-cmd in composer.json to a scriptHandler function I created :

<?php

namespace AppBundle\Composer;

use Composer\Script\Event;

class ScriptHandler extends \Sensio\Bundle\DistributionBundle\Composer\ScriptHandler {

    public static function ckEditorInstall(Event $event)
    {
        $options = self::getOptions($event);
        $consoleDir = self::getConsoleDir($event, 'CkEditor install');

        if (null === $consoleDir) {
            return;
        }

        static::executeCommand($event, $consoleDir, 'ckeditor:install --release=custom --custom-build-id=58d0f97187c76c2b113d525a9bc9819e --no-progress-bar --clear=drop', $options['process-timeout']);
    }

}

Is there any better way ? Or do who have to upgrade FOSCKEditorBundle to take into account config for that ?

Thanks :)

TomaszGasior commented 4 years ago

@mattchete This is how I use it: https://github.com/TomaszGasior/RadioLista-v3/blob/de036cfb3315febb6d6a3047fff103a72cc83ca2/composer.json#L71

mattchete commented 4 years ago

Yeah I've seen that but i'm on sf3. I just found that from the previous version, I guess that's the solution for now: https://github.com/FriendsOfSymfony/FOSCKEditorBundle/pull/152/files