ckeditor5.schema.yml

Same filename in other branches
  1. 10 core/modules/ckeditor5/config/schema/ckeditor5.schema.yml
  2. 11.x core/modules/ckeditor5/config/schema/ckeditor5.schema.yml
core/modules/ckeditor5/config/schema/ckeditor5.schema.yml

File

core/modules/ckeditor5/config/schema/ckeditor5.schema.yml

View source
  1. # Schema for the configuration files of the CKEditor 5 module.
  2. editor.settings.ckeditor5:
  3. type: mapping
  4. label: 'CKEditor 5 settings'
  5. mapping:
  6. toolbar:
  7. type: mapping
  8. label: 'Toolbar configuration'
  9. mapping:
  10. items:
  11. type: sequence
  12. label: 'Items'
  13. sequence:
  14. type: ckeditor5.toolbar_item
  15. label: 'Button'
  16. constraints:
  17. # Each active CKEditor 5 toolbar item whose plugin has conditions must have those conditions met.
  18. CKEditor5ToolbarItemConditionsMet: []
  19. plugins:
  20. type: sequence
  21. label: 'Plugins'
  22. sequence:
  23. type: ckeditor5.plugin.[%key]
  24. constraints:
  25. # Each enabled CKEditor 5 plugin that implements \Drupal\ckeditor5\Plugin\CKEditor5PluginConfigurableInterface
  26. # must exist in here.
  27. CKEditor5EnabledConfigurablePlugins: []
  28. # Plugin \Drupal\ckeditor5\Plugin\CKEditor5Plugin\Language
  29. ckeditor5.plugin.ckeditor5_language:
  30. type: mapping
  31. label: 'Language'
  32. mapping:
  33. language_list:
  34. type: string
  35. label: 'Language list ID'
  36. constraints:
  37. # Configuring this does not make sense without the corresponding button.
  38. CKEditor5ToolbarItemDependencyConstraint:
  39. toolbarItem: textPartLanguage
  40. # Only two possible values are accepted.
  41. Choice:
  42. - un
  43. - all
  44. # Plugin \Drupal\ckeditor5\Plugin\CKEditor5Plugin\Heading
  45. ckeditor5.plugin.ckeditor5_heading:
  46. type: mapping
  47. label: Headings
  48. mapping:
  49. enabled_headings:
  50. type: sequence
  51. label: 'Enabled Headings'
  52. constraints:
  53. NotBlank:
  54. message: "Enable at least one heading, otherwise disable the Heading plugin."
  55. sequence:
  56. type: string
  57. label: 'Heading type'
  58. constraints:
  59. Choice:
  60. callback: \Drupal\ckeditor5\Plugin\CKEditor5Plugin\Heading::validChoices
  61. # Plugin \Drupal\ckeditor5\Plugin\CKEditor5Plugin\ImageResize
  62. ckeditor5.plugin.ckeditor5_imageResize:
  63. type: mapping
  64. label: Image Resize
  65. mapping:
  66. allow_resize:
  67. type: boolean
  68. label: 'Allow resize'
  69. constraints:
  70. NotNull: []
  71. # Plugin \Drupal\ckeditor5\Plugin\CKEditor5Plugin\SourceEditing
  72. ckeditor5.plugin.ckeditor5_sourceEditing:
  73. type: mapping
  74. label: Source Editing
  75. mapping:
  76. allowed_tags:
  77. type: sequence
  78. label: 'Allowed Tags'
  79. sequence:
  80. type: ckeditor5.element
  81. label: 'Allowed Tag'
  82. constraints:
  83. SourceEditingRedundantTags: []
  84. SourceEditingPreventSelfXssConstraint: []
  85. # Plugin \Drupal\ckeditor5\Plugin\CKEditor5Plugin\Alignment
  86. ckeditor5.plugin.ckeditor5_alignment:
  87. type: mapping
  88. label: Alignments
  89. mapping:
  90. enabled_alignments:
  91. type: sequence
  92. label: 'Enabled Alignments'
  93. constraints:
  94. NotBlank:
  95. message: "Enable at least one alignment, otherwise disable the Alignment button."
  96. sequence:
  97. type: string
  98. label: 'Alignment type'
  99. constraints:
  100. Choice:
  101. - left
  102. - center
  103. - right
  104. - justify
  105. # Plugin \Drupal\ckeditor5\Plugin\CKEditor5Plugin\ListPlugin
  106. ckeditor5.plugin.ckeditor5_list:
  107. type: mapping
  108. label: List
  109. mapping:
  110. reversed:
  111. type: boolean
  112. label: 'Allow reverse list'
  113. constraints:
  114. NotNull: []
  115. startIndex:
  116. type: boolean
  117. label: 'Allow start index'
  118. constraints:
  119. NotNull: []
  120. # Plugin \Drupal\ckeditor5\Plugin\CKEditor5Plugin\Media
  121. ckeditor5.plugin.media_media:
  122. type: mapping
  123. label: Media
  124. mapping:
  125. allow_view_mode_override:
  126. type: boolean
  127. label: 'Allow view mode override'
  128. constraints:
  129. NotNull: []
  130. # Plugin \Drupal\ckeditor5\Plugin\CKEditor5Plugin\Style
  131. ckeditor5.plugin.ckeditor5_style:
  132. type: mapping
  133. label: Style
  134. mapping:
  135. styles:
  136. type: sequence
  137. label: 'Styles'
  138. constraints:
  139. NotBlank:
  140. message: "Enable at least one style, otherwise disable the Style plugin."
  141. UniqueLabelInList:
  142. labelKey: label
  143. sequence:
  144. type: mapping
  145. label: 'Style'
  146. mapping:
  147. label:
  148. type: label
  149. label: 'Style label'
  150. element:
  151. type: ckeditor5.element
  152. constraints:
  153. # Validate that this contains exactly 1 attribute (class) and >=1 class attr value.
  154. CKEditor5Element:
  155. requiredAttributes:
  156. -
  157. attributeName: class
  158. minAttributeValueCount: 1
  159. StyleSensibleElement: []
  160. label: 'Style tag + classes'

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.