在 TYPO3 中从 ckeditor 添加 "fontsize" 到自定义 yaml 文件

Adding "fontsize" to custom yaml file from ckeditor in TYPO3

我遇到了问题,"fontsize" 字段在我自己的自定义配置中没有显示。

我的 YAML 文件如下所示:

# Load default processing options
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" }


# Add configuration for the editor
# For complete documentation see http://docs.ckeditor.com/#!/api/CKEDITOR.config
editor:
  config:
    contentsCss: ["EXT:rte_ckeditor/Resources/Public/Css/contents.css", "EXT:myext/Resources/Public/css/rte.css"]


    format_tags: "p;h1;h2;h3;h4;h5;pre;div"

    stylesSet:
      # block level styles
      - { 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: "Interview", element: ['h5', 'p', 'span'], attributes: { 'class': 'ecx-interview' }}
      - { name: 'Underline whole element', element: 'p', attributes: { 'class': 'p-carreer' } }
      - { name: "Tiny Paragraph", element: "p", attributes: { 'class': 'p-tiny' }}
      # Inline styles
      - { name: 'Underline whole element', element: 'p', attributes: { 'class': 'p-carreer' } }
      - { name: "Important", element: "span", attributes: { 'class': 'c-important' }}
      - { name: "Tiny Word", element: "span", attributes: { 'class': 'c-tiny' }}
      # List styles
      - { name: 'Underline whole element', element: 'p', attributes: { 'class': 'p-carreer' } }
      - { name: 'UL Style 2', element: 'ol', attributes: { 'class': 'ul-style2' } }
      - { name: 'No UL Bullets', element: 'ul', attributes: { 'class': 'no-bullet' } }
      # Link styles
      - { name: "External Link", element: "a", attributes: { class: "external-link"} }
      - { name: "Arrow-link", element: "a", attributes: { class: "ecx-explore-arrow-link more d-flex align-items-center"} }
      # Form styles
      - { name: "Table Responsive", element: "table", attributes: { 'class': 'contenttable table-responsive' } }

    toolbar:
      - [ 'Link', 'Unlink', 'Anchor', 'Table', 'SpecialChar', 'CodeSnippet', 'Youtube' ]
      - [ 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock' ]
      - [ 'NumberedList', 'BulletedList']
      - [ 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord' ]
      - [ 'Undo', 'Redo', 'RemoveFormat', 'ShowBlocks' ]
      - "/"
      - [ 'Format', 'Styles','Size' ]
      - [ 'Bold', 'Italic', 'Underline', 'Blockquote', 'Subscript', 'Superscript']
      - [ 'Source', 'Maximize', 'About']


    extraPlugins:
      - justify
      - specialchar
      - showblocks
      - codesnippet
      - font

    justifyClasses:
      - align-left
      - align-center
      - align-right
      - align-justify

    codeSnippet_theme: 'monokai_sublime'

    removePlugins:
      - image

processing:
  allowTags:
    - iframe

我尝试导入其他一些 .yaml(完整、正在处理、...)文件或包含来自 ckeditor 的官方字体插件,但没有任何效果。 我正在使用 TYPO3 8.7.16。

后端的配置如下所示:TYPO3 Backend custom configuration ckeditor

谢谢!

使用您的配置:

    toolbar:
       - [ 'Format', 'Styles','FontSize' ]

而不是

    toolbar:
       - [ 'Format', 'Styles','Size' ]

参见: CKEditor 4 - how to add font family and font size controls to the toolbar