Skip to content

Commit

Permalink
[BUGFIX] Accept configuration for external plugins from presets in ck…
Browse files Browse the repository at this point in the history
…editor

Currently the default configuration of an external
plugin is always used for the configuration. This patch takes care
of a proper merging of the configuration.

The configuration of the extension is taken as default. If a
custom configuration in a preset is available, both configurations
will be merged.

Resolves: #81263
Releases: master,8.7
Change-Id: I4fc7c4f6f6ab40fe06e495e3ff98e067427c7d03
Reviewed-on: https://review.typo3.org/52857
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Mathias Schreiber <mathias.schreiber@typo3.com>
Tested-by: Mathias Schreiber <mathias.schreiber@typo3.com>
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Naegler <frank.naegler@typo3.org>
  • Loading branch information
Marcus Schwemer authored and NeoBlack committed Mar 15, 2018
1 parent 939b417 commit 6369928
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ protected function getCkEditorRequireJsModuleCode(string $fieldId) : string

$externalPlugins = '';
foreach ($this->getExtraPlugins() as $pluginName => $config) {
if (!empty($config['config']) && !empty($configuration[$pluginName])) {
$config['config'] = array_replace_recursive($config['config'], $configuration[$pluginName]);
}
$configuration[$pluginName] = $config['config'];
$configuration['extraPlugins'] .= ',' . $pluginName;

Expand Down

0 comments on commit 6369928

Please sign in to comment.