From a04a042c34ad344df5df06cb4dadfcb4546bbf09 Mon Sep 17 00:00:00 2001 From: Benjamin Kott Date: Wed, 16 Oct 2024 14:05:04 +0200 Subject: [PATCH] [BUGFIX] Correct codeEditor check for v13 --- .../400_bootstrappackage_carousel_item.php | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/Configuration/TCA/Overrides/400_bootstrappackage_carousel_item.php b/Configuration/TCA/Overrides/400_bootstrappackage_carousel_item.php index e25071479..e02331b12 100644 --- a/Configuration/TCA/Overrides/400_bootstrappackage_carousel_item.php +++ b/Configuration/TCA/Overrides/400_bootstrappackage_carousel_item.php @@ -7,10 +7,13 @@ * LICENSE file that was distributed with this source code. */ +use TYPO3\CMS\Core\Information\Typo3Version; +use TYPO3\CMS\Core\Utility\ExtensionManagementUtility; + defined('TYPO3') or die('Access denied.'); -// Activate T3EDITOR if extension is activated -if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('t3editor')) { +// v12 +if (ExtensionManagementUtility::isLoaded('t3editor')) { $GLOBALS['TCA']['tx_bootstrappackage_carousel_item']['types']['html']['columnsOverrides'] = [ 'bodytext' => [ 'config' => [ @@ -21,3 +24,16 @@ ], ]; } + +// v13 onwards +if ((new Typo3Version)->getMajorVersion() >= 13) { + $GLOBALS['TCA']['tx_bootstrappackage_carousel_item']['types']['html']['columnsOverrides'] = [ + 'bodytext' => [ + 'config' => [ + 'renderType' => 'codeEditor', + 'wrap' => 'off', + 'format' => 'html', + ], + ], + ]; +}