Typo3 类型3:覆盖字段bodytext以加载扩展名中的rte\u ckeditor

Typo3 类型3:覆盖字段bodytext以加载扩展名中的rte\u ckeditor,typo3,extbase,Typo3,Extbase,我目前正在将TYPO3(以及安装的自定义扩展)从6.2更新到8.7。扩展创建一些自定义内容元素,使用“extbuilder”构建。到目前为止一切正常,但rte_ckeditor没有加载到这些内容元素的后端。rte_ckeditor已安装并在标准内容元素中工作 我在这里用ColumnSoferrides用第二个例子“rte_1”试了一下。这是我在typo3conf/ext/myExt/Configuration/TCA/Overrides/tt_content.php文件中的代码 $GLO

我目前正在将TYPO3(以及安装的自定义扩展)从6.2更新到8.7。扩展创建一些自定义内容元素,使用“extbuilder”构建。到目前为止一切正常,但rte_ckeditor没有加载到这些内容元素的后端。rte_ckeditor已安装并在标准内容元素中工作

我在这里用ColumnSoferrides用第二个例子“rte_1”试了一下。这是我在typo3conf/ext/myExt/Configuration/TCA/Overrides/tt_content.php文件中的代码

    $GLOBALS['TCA']['tt_content']['types']['myext']['columnsOverrides'] = array(
    'bodytext' => array(
        'config' => array(
            'type' => 'text',
            'enableRichtext' => true,
        )
    )
);
在my ext_tables.php中,该字段加载了以下内容:

$TCA['tt_content']['types']['myext_callout']['showitem'] = 'CType, header;Überschrift, subheader;Untertitel, image, bodytext;Beschreibung Preis/Leistung';

你知道为什么编辑器没有加载吗?

问题解决了。这是tt_content.php中的正确代码:

$customFields = [
    'bodytext' => [
        'exclude' => false,
        'l10n_mode' => 'prefixLangTitle',
        'label' => 'Inhalt',
        'config' => [
            'type' => 'text',
            'cols' => 40,
            'rows' => 6,
            'enableRichtext' => true
        ],
    ]
];
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('tt_content',$customFields);

问题解决了。这是tt_content.php中的正确代码:

$customFields = [
    'bodytext' => [
        'exclude' => false,
        'l10n_mode' => 'prefixLangTitle',
        'label' => 'Inhalt',
        'config' => [
            'type' => 'text',
            'cols' => 40,
            'rows' => 6,
            'enableRichtext' => true
        ],
    ]
];
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('tt_content',$customFields);