Skip to content

Commit

Permalink
#32 Cannot get ckeditor config to work
Browse files Browse the repository at this point in the history
  • Loading branch information
acantepie committed Oct 14, 2022
1 parent 1e73d08 commit 41cad23
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 4 additions & 0 deletions Bundle/CoreBundle/src/Ckeditor/CkeditorConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ private function resolveConfig(array $bundleConfig)
$this->configs['full'] = self::FULL_CONFIG;

foreach ($bundleConfig['configs'] as $configName => $config) {
if (!is_array($config)) {
throw new \RuntimeException(sprintf('[Ckeditor] Invalid "umbrella_core.configs.%s" config. Ckeditor config must be an array of options. ', $configName));
}

$this->configs[$configName] = $config;
}

Expand Down
7 changes: 3 additions & 4 deletions Bundle/CoreBundle/src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,14 @@ private function ckeditorSection(ArrayNodeDefinition $rootNode)
->end()
->scalarNode('default_config')
->defaultValue('full')
->info('Default config to use on CkeditorType (if none specified).')
->info('Default config to use on CkeditorType (if none specified on CkeditorType).')
->end()
->arrayNode('configs')
->info('List of configs for CkeditorType @see Umbrella\CoreBundle\Ckeditor\CkeditorConfiguration for example.')
->example(['my_custom_config' => CkeditorConfiguration::EXAMPLE_CONFIG])
->normalizeKeys(false)
->useAttributeAsKey('name')
->arrayPrototype()
->scalarPrototype()->end()
->normalizeKeys(false)
->variablePrototype()
->end();
}

Expand Down

0 comments on commit 41cad23

Please sign in to comment.