如何在您的自己的预设中排除某些对齐选项?
虽然我没有指定“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
您可以单独激活所需的选项(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
各个按钮的显示方式如下: