Dedicated RTE config per CType

此生再无相见时 提交于 2020-01-06 12:29:14

问题


I want to give the user the minimal RTE for some kinds of custom content elements in TYPO3 8.7.

I found this old approach here but it is not compatible with the ckeditor of TYPO3 8.

RTE.config.tt_content.bodytext.types.ccc_teasertext {
    showButtons = bold, italic, underline, link, chMode, orderedlist, unorderedlist
    RTEHeightOverride = 600
}

RTE.config.tt_content.bodytext.types.ccc_introtext {
    showButtons = bold, italic, chMode
    RTEHeightOverride = 300
}

How do I use RTE.config with the new ckeditor syntax like this RTE.tt_content.types.textmedia.bodytext.preset = minimal ?


回答1:


https://stackoverflow.com/a/55391407/4062341

Fellow TYPO3 developer gautamsinh mori pointed me here to a solution for the problem:

Don't configure the RTE in the PageTS but in the TCA Overrides per content element like this:

$GLOBALS['TCA']['tt_content']['types']['myCustomContentElement']=[
    'showitem' => '
--palette--; LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xml:palette.general; general,header,subheader,header_link,bodytext,image,
--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xml:tabs.appearance,
--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xml:palette.frames;frames,
--div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.access,
--palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.visibility;visibility,
--palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.access;access,
--div--;LLL:EXT:lang/locallang_tca.xlf:sys_category.tabs.category, categories, tx_gridelements_container, tx_gridelements_columns
',
    'columnsOverrides' => [
        'bodytext' => [
            'config' => [
                'enableRichtext' => true,
                'richtextConfiguration' => 'minimal'
            ]
        ]
    ]
];

Note: 'minimal' is the preset.



来源:https://stackoverflow.com/questions/55376681/dedicated-rte-config-per-ctype

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!