diff --git a/typo3/sysext/backend/Classes/Form/FormDataProvider/TcaText.php b/typo3/sysext/backend/Classes/Form/FormDataProvider/TcaText.php index c2c95eb618b3aa94b042d4c22e9c1a2cca53442c..49a45e11fefc6fb6c23ab65d00a22ba38b712e23 100644 --- a/typo3/sysext/backend/Classes/Form/FormDataProvider/TcaText.php +++ b/typo3/sysext/backend/Classes/Form/FormDataProvider/TcaText.php @@ -48,6 +48,8 @@ class TcaText implements FormDataProviderInterface (string)$result['recordTypeValue'], $fieldConfig['config'] ); + // remember RTE preset name + $result['processedTca']['columns'][$fieldName]['config']['richtextConfigurationName'] = $fieldConfig['config']['richtextConfiguration'] ?? ''; // Add final resolved configuration to TCA array $result['processedTca']['columns'][$fieldName]['config']['richtextConfiguration'] = $richtextConfiguration; diff --git a/typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaTextTest.php b/typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaTextTest.php index 03f5cc1fed8ec3461b6c35ad1b54ea2722fd7e46..b86c09e6504795a80b404fa1078c85999540a055 100644 --- a/typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaTextTest.php +++ b/typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaTextTest.php @@ -61,6 +61,7 @@ class TcaTextTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase 'config' => [ 'type' => 'text', 'enableRichtext' => true, + 'richtextConfigurationName' => '', 'richtextConfiguration' => [ 'aConfig' => 'option', ], diff --git a/typo3/sysext/rte_ckeditor/Classes/Controller/BrowseLinksController.php b/typo3/sysext/rte_ckeditor/Classes/Controller/BrowseLinksController.php index 41f4139e878c19041142f673da34d0cb0a443397..2fa92648b9a97416a95aaef061f2da0bab70ba5b 100644 --- a/typo3/sysext/rte_ckeditor/Classes/Controller/BrowseLinksController.php +++ b/typo3/sysext/rte_ckeditor/Classes/Controller/BrowseLinksController.php @@ -125,6 +125,11 @@ class BrowseLinksController extends AbstractLinkBrowserController $this->contentLanguageService->init($this->contentsLanguage); + $tcaFieldConf = ['enableRichtext' => true]; + if (!empty($queryParameters['P']['richtextConfigurationName'])) { + $tcaFieldConf['richtextConfiguration'] = $queryParameters['P']['richtextConfigurationName']; + } + /** @var Richtext $richtextConfigurationProvider */ $richtextConfigurationProvider = GeneralUtility::makeInstance(Richtext::class); $this->thisConfig = $richtextConfigurationProvider->getConfiguration( @@ -132,7 +137,7 @@ class BrowseLinksController extends AbstractLinkBrowserController $this->parameters['fieldName'], (int)$this->parameters['pid'], $this->parameters['recordType'], - ['richtext' => true] + $tcaFieldConf ); $this->buttonConfig = $this->thisConfig['buttons']['link'] ?? []; } diff --git a/typo3/sysext/rte_ckeditor/Classes/Form/Element/RichTextElement.php b/typo3/sysext/rte_ckeditor/Classes/Form/Element/RichTextElement.php index f594507b090af1bbaeb02d2a8968a5eb94f640c6..0695b7735521aeb7e6cb4ff98f2c536ddfe384eb 100644 --- a/typo3/sysext/rte_ckeditor/Classes/Form/Element/RichTextElement.php +++ b/typo3/sysext/rte_ckeditor/Classes/Form/Element/RichTextElement.php @@ -209,6 +209,7 @@ class RichTextElement extends AbstractFormElement 'fieldName' => $this->data['fieldName'], 'recordType' => $this->data['recordTypeValue'], 'pid' => $this->data['effectivePid'], + 'richtextConfigurationName' => $this->data['parameterArray']['fieldConf']['config']['richtextConfigurationName'] ] ];