如何在TYPO3 7.6中增加常数和设置t3editor高度

时间:2017-05-22 06:27:12

标签: typo3 typoscript t3editor

我们最近将TYPO3版本从6.2更新到7.6,现在t3editor字段太小而无法使用:

enter image description here

他们曾经是重新调整大小但现在他们是固定的高度,这太小了。

是否有内置的方法可以让它们重新调整大小?

编辑:我最终将rowswrap值添加到typo3/sysext/t3editor/Configuration/TCA/Overrides/sys_templa‌​te.php

// Activate t3editor for sys_template constants
if (is_array($GLOBALS['TCA']['sys_template']['columns']['constants']['config'])) {
    $GLOBALS['TCA']['sys_template']['columns']['constants']['config']['renderType'] = 't3editor';
    $GLOBALS['TCA']['sys_template']['columns']['constants']['config']['format'] = 'typoscript';
    $GLOBALS['TCA']['sys_template']['columns']['constants']['config']['rows'] = 20;
    $GLOBALS['TCA']['sys_template']['columns']['constants']['config']['wrap'] = 'ON';
}

// Activate t3editor for sys_template config
if (is_array($GLOBALS['TCA']['sys_template']['columns']['config']['config'])) {
    $GLOBALS['TCA']['sys_template']['columns']['config']['config']['renderType'] = 't3editor';
    $GLOBALS['TCA']['sys_template']['columns']['config']['config']['format'] = 'typoscript';
    $GLOBALS['TCA']['sys_template']['columns']['config']['config']['rows'] = 20;
    $GLOBALS['TCA']['sys_template']['columns']['config']['config']['wrap'] = 'ON';
}

1 个答案:

答案 0 :(得分:1)

一种替代方法可能是覆盖列配置的$GLOBALS['TCA']。您可以为cols表配置中的rowswrapsys_template为第一个configsetup提供新值textarea),constantsdescription

$GLOBALS['TCA']
sys_template
    columns
        config {***setup***}
            config
                cols = 48
                format = typoscript
                renderType = t3editor
                rows = 10
                softref = TStemplate,email[subst],url[subst]
                type = text
                wrap = OFF
            defaultExtras = fix-font : enable-tab
            label = LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:systemplate.config
        constants
            config
                cols = 48
                format = typoscript
                renderType = t3editor
                rows = 10
                softref = TStemplate,email[subst],url[subst]
                type = text
                wrap = OFF
            defaultExtras = fix-font : enable-tab
            label = LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:systemplate.constants
        description
            config
                cols = 48
                rows = 5
                type = text
            defaultExtras = fix-font : enable-tab
            label = LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:systemplate.description

TCA参考 page for a TEXT-type column提供了更多信息,page for storing TCA changes可以告诉您更改的位置。