如何删除TYPO3 12 CKEditor 5中的对齐选项?

问题描述 投票:0回答:1

如何在您的自己的预设中排除某些对齐选项?

虽然我没有指定“right”和“justify”,但它们仍然显示:

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:
    alignment:
      options:
        - { name: 'left', className: 'text-left' }
        - { name: 'center', className: 'text-center' }

    toolbar:
      items:
        - bold
        - italic
        - alignment

enter image description here

typo3 ckeditor5 typo3-12.x
1个回答
0
投票

您可以单独激活所需的选项(JustifyLeft、JustifyCenter、JustifyRight、JustifyBlock),而不是一次全部激活(对齐):

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:
    alignment:
      options:
        - { name: 'left', className: 'text-left' }
        - { name: 'center', className: 'text-center' }
        - { name: 'right', className: 'text-right' }
        - { name: 'justify', className: 'text-justify' }

    toolbar:
      items:
        - bold
        - italic
        #- alignment
        - JustifyLeft
        - JustifyCenter
        #- JustifyRight
        #- JustifyBlock

各个按钮的显示方式如下:

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.