Project

General

Profile

Actions

Bug #101437

closed

Epic #99669: CKEditor5 Collection

rte_ckeditor externalPlugins with resource configuration doesn't work

Added by Jessica Jagodzinski 10 months ago. Updated 6 months ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
RTE (rtehtmlarea + ckeditor)
Target version:
-
Start date:
2023-07-25
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
12
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Following configuration doesn't work:

  externalPlugins:
    example:
      resource: 'EXT:example/Resources/Public/CKeditor/Plugins/example/plugin.js'

in vendor/typo3/cms-rte-ckeditor/Classes/Form/Element/RichTextElement.php it appears that the configuration is mistakenly being set empty line 299.

        foreach ($externalPlugins as $pluginName => $configuration) {
            $pluginConfiguration[$pluginName] = [
                'configName' => $configuration['configName'] ?? $pluginName,
            ];
            if ($configuration['resource'] ?? null) {
                $configuration['resource'] = $this->resolveUrlPath($configuration['resource']);
            }
            unset($configuration['configName']); 
            unset($configuration['resource']); // <- this line

            if ($configuration['route'] ?? null) {
                $configuration['routeUrl'] = (string)$uriBuilder->buildUriFromRoute($configuration['route'], $urlParameters);
            }

            $pluginConfiguration[$pluginName]['config'] = $configuration;
        }

If I comment out this line, the path returned in $configuration['resource'] also does not exist.


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #100784: CKEditor 5 - Configuration of custom CKeditor 5 plugin via RTE.editor.config.{customPlugin} not possibleResolved2023-05-10

Actions
Related to TYPO3 Core - Task #101465: Update ext:rte_ckeditor documentationClosedTorben Hansen2023-07-28

Actions
Actions

Also available in: Atom PDF