Skip to content

Commit

Permalink
[BUGFIX] Correct codeEditor check for v13
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminkott committed Oct 16, 2024
1 parent 432d0df commit a04a042
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions Configuration/TCA/Overrides/400_bootstrappackage_carousel_item.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' => [
Expand All @@ -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',
],
],
];
}

0 comments on commit a04a042

Please sign in to comment.