Created
October 19, 2015 12:54
-
-
Save QuingKhaos/f23af6c31e529e25ecd8 to your computer and use it in GitHub Desktop.
Add a RTE field to tt_content
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// typo3conf/ext/yourext/Configuration/TCA/Overrides/tt_content.php | |
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility; | |
$fields = [ | |
'my_rte' => [ | |
'label' => 'Mein RTE', | |
'config' => ['config' => [ | |
'type' => 'text', | |
'eval' => 'required,trim', | |
], | |
], | |
]; | |
ExtensionManagementUtility::addTCAcolumns('tt_content', $fields); | |
// Define the CTypes as comma separated list, to which you want to add your field | |
ExtensionManagementUtility::addToAllTCAtypes('tt_content', 'my_rte;;;richtext[]:rte_transform[mode=ts];', 'text,textimage'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment