在我的 TYPO3 站点包扩展中,我有两种不同的 CKEditor 配置预设:默认的和选项较少的最小的。
在我的 page.tsconfig 中,我定义了默认配置并为某些字段设置了最小配置,这对于常规 tt_content 字段以及其他扩展的 RTE 文本字段非常有效。我无法使其工作,但对于插件 Flexform 中的文本字段。
根据 documentation 它应该通过使用
RTE.config.[tableName].[flexForm.field.name].preset
来工作,即使 tt_content
的示例为 tableName
- 但事实并非如此。有什么我忽略的错误吗?
page.tsconfig
RTE {
default.preset = MyDefaultCKConfig
config {
tx_another_extension_model_xyz {
## this works
field_name.preset = MyMinimalCKConfig
another_field_name.preset = MyMinimalCKConfig
}
## the following does not work
tt_content.settings.flexform.textAdd.preset = MyMinimalCKConfig
}
}
插件 Flexform 定义(摘录)
<settings.flexform.textAdd>
<TCEforms>
<exclude>1</exclude>
<label>LLL:EXT:tx_another_extension/Resources/Private/Language/locallang_be.xlf:flexform.pluginName.textAdd</label>
<config>
<type>text</type>
<cols>40</cols>
<rows>5</rows>
<enableRichtext>true</enableRichtext>
</config>
</TCEforms>
</settings.flexform.textAdd>
Christian Fries 的评论揭示了解决方案。我把它贴在这里,以便其他人可以更容易地找到它。
实际设置字段中的点settings.flexform.textAdd
– 并且只有这些 – 需要转义:
RTE {
default.preset = MyDefaultCKConfig
config {
tt_content.settings\.flexform\.textAdd.preset = MyMinimalCKConfig
}
}