0

我尝试headline-red为标题添加一个新类 ( ),尤其是对于 h5 元素。我正在使用以下 TS 设置:

RTE >

RTE {
    classes {
        headline-red {
            name = Heading Rot
        }
    }

    default {
        contentCSS = /typo3conf/ext/test/Resources/Public/rte.css
        useCSS = 1
        showTagFreeClasses = 1

        buttons {
            textstyle {
                tags {
                    h5 {
                        allowedClasses(
                            headline-red
                        )
                    }
                }
            }
        }

        proc {
            allowedClasses(
                headline-red
            )
        }
    }
}

我的 rte.css 只包含这个小测试件:

h5.headline-red {
    color: #c1002a;
}

但这不会改变 RTE 编辑器。我错过了什么吗?

4

2 回答 2

1

您使用打字稿添加客户标题标签。

转到页面>>根>>编辑(页面)>>资源和以下排版

TCEFORM.tt_content.header_layout {
    addItems {
        10 = Advance Header
    }
}

将标题包装在 TS 下方。

lib.stdheader.10.10 >
lib.stdheader.10.10 = COA
lib.stdheader.10.10 {
   wrap = <div class="page-header"> | </div>
   20 = TEXT
   20.current = 1
   20.insertData = 1
   20.fontTag = <span class="h1" > &nbsp;|</span>
}

您将获得以下输出。

在此处输入图像描述

于 2015-12-08T08:08:21.010 回答
0

我使用相同的解决方案,它的工作就像一个魅力。

在 TS 配置中:

RTE.classes.h2-bis.name = H2 alternatif 
RTE.default.contentCSS = typo3conf/ext/ps_template/res/ressources/css/rte.css

在 Rte.css 中

h2.h2-bis{color: #ff0000;}

经过一些测试,我认为问题只是你的css路径中的“斜线”。尝试不使用它。

再见

于 2016-07-27T13:35:59.790 回答