TYPO3 CKEditor - 配置不起作用

时间:2017-10-02 11:59:22

标签: ckeditor typo3 yaml typoscript typo3-8.7.x

我有一个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

让我的配置工作的诀窍是什么?!

1 个答案:

答案 0 :(得分:0)

在我的情况下,我使用的是DCE扩展 - 预设被忽略了。要使用任何预设,请使用此DCE字段配置:

<config>
    <type>text</type>
    <rows>5</rows>
    <cols>30</cols>
    <eval>trim,required</eval>
    <enableRichtext>1</enableRichtext>
    <richtextConfiguration>mypreset</richtextConfiguration>
</config>

我通知了Ext开发者DCE Ext,他更新了RTE Con​​fig&#34;预设&#34;已经