我当前正在将TYPO3(和已安装的自定义扩展名)从6.2更新到8.7。扩展创建一些自定义内容元素,并使用“ extbuilder”构建。到目前为止,一切都还不错,但是这些内容元素中的rte_ckeditor ist尚未加载到后端。 rte_ckeditor已安装并在标准内容元素中工作。
我在此处https://docs.typo3.org/m/typo3/reference-tca/8.7/en-us/ColumnsConfig/Type/Text.html的第二个示例“ rte_1”中使用了columnOverrides进行了尝试。这是我在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,
)
)
);
在我的ext_tables.php中,该字段加载有:
$TCA['tt_content']['types']['myext_callout']['showitem'] = 'CType, header;Überschrift, subheader;Untertitel, image, bodytext;Beschreibung Preis/Leistung';
您有一个主意,为什么不加载编辑器?
答案 0 :(得分:0)
问题解决了。这是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);