我有一个 TYPO3 8.7.7 安装并且我正在使用 rte_ckeditor。我正在尝试配置编辑器——但它似乎不起作用。当我设置RTE.default.preset = full
或其他任何东西时,我的后端表单没有任何变化。
但我需要配置一些单独的选项。所以我将默认预设设置为我自己的 YAML 文件 ( RTE.default.preset = mytemplate
),该文件也在我的扩展 ext_localconf.php 中注册
$GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets']['mytemplate'] = 'EXT:mytemplate/Configuration/RTE/rte.yaml';
我已经清除了typo3temp文件夹,通过后端的系统缓存,通过安装工具的所有缓存,停用并重新激活了我的模板扩展。
我也不会在 RTE 的后端表单中更改任何内容。
有时它唯一会做的事情是,当我清除后端的系统缓存并保存后端表单时,TYPO3 会在我的 YAML 文件中显示语法错误 - 现在都已解决,但它也不再显示任何内容。只是默认的 RTE...
我的 YAML 文件没有什么特别的......只是来了类和格式标签“pre”替换为“h6”
imports:
- { resource: "EXT:rte_ckeditor/Configuration/RTE/Processing.yaml" }
- { resource: "EXT:rte_ckeditor/Configuration/RTE/Editor/Base.yaml" }
- { resource: "EXT:rte_ckeditor/Configuration/RTE/Editor/Plugins.yaml" }
editor:
config:
contentsCss: ["EXT:mytemplate/Resources/Public/css/rte/rte.css"]
format_tags: "p;h1;h2;h3;h4;h5;h6"
stylesSet:
- { name: "align-left", element: ['h1', 'h2', 'h3', 'h4','h5', 'h6', 'p', 'td', 'th'], attributes: { 'class': 'align-left' }}
- { name: "align-center", element: ['h1', 'h2', 'h3', 'h4','h5', 'h6', 'p', 'td', 'th'], attributes: { 'class': 'align-center' }}
- { name: "align-right", element: ['h1', 'h2', 'h3', 'h4','h5', 'h6', 'p', 'td', 'th'], attributes: { 'class': 'align-right' }}
- { name: "align-justify", element: ['h1', 'h2', 'h3', 'h4','h5', 'h6', 'p', 'td', 'th'], attributes: { 'class': 'align-justify' }}
- { name: "Headline Stil 1", element: ['h1', 'h2', 'h3', 'h4','h5', 'h6'], attributes: { 'class': 'headline-style-1' }}
- { name: "Headline Stil 2", element: ['h1', 'h2', 'h3', 'h4','h5', 'h6'], attributes: { 'class': 'headline-style-2' }}
- { name: "Headline Stil 3", element: ['h1', 'h2', 'h3', 'h4','h5', 'h6'], attributes: { 'class': 'headline-style-3' }}
- { name: "Headline Stil 4", element: ['h1', 'h2', 'h3', 'h4','h5', 'h6'], attributes: { 'class': 'headline-style-4' }}
- { name: "Button-Link Primär", element: ['a'], attributes: { 'class': 'rte-btn-primary' }}
- { name: "Button-Link Sekundär", element: ['a'], attributes: { 'class': 'rte-btn-secondary' }}
- { name: "Button-Link Tertiär", element: ['a'], attributes: { 'class': 'rte-btn-tertiary' }}
toolbarGroups:
- { name: styles, groups: [ styles, format ] }
- { name: basicstyles, groups: [ basicstyles ] }
- { name: paragraph, groups: [ list, indent, blocks, align ] }
- { name: links, groups: [ links ] }
- { name: clipboard, groups: [ clipboard, cleanup, undo ] }
- { name: editing, groups: [ spellchecker ] }
- { name: insert, groups: [ insert ] }
- { name: tools, groups: [ table, specialchar ] }
- { name: document, groups: [ mode ] }
justifyClasses:
- align-left
- align-center
- align-right
- align-justify
extraPlugins:
- justify
removePlugins:
- image
removeButtons:
- Anchor
- Underline
- Strike
- Styles
让我的配置工作的诀窍是什么?!