ckeditor5.schema.yml

Same filename in other branches
  1. 9 core/modules/ckeditor5/config/schema/ckeditor5.schema.yml
  2. 10 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. orderby: ~
  13. label: 'Items'
  14. sequence:
  15. type: ckeditor5.toolbar_item
  16. label: 'Button'
  17. constraints:
  18. # Each active CKEditor 5 toolbar item whose plugin has conditions must have those conditions met.
  19. CKEditor5ToolbarItemConditionsMet: []
  20. plugins:
  21. type: sequence
  22. label: 'Plugins'
  23. orderby: key
  24. sequence:
  25. type: ckeditor5.plugin.[%key]
  26. constraints:
  27. FullyValidatable: ~
  28. # Each enabled CKEditor 5 plugin that implements \Drupal\ckeditor5\Plugin\CKEditor5PluginConfigurableInterface
  29. # must exist in here.
  30. CKEditor5EnabledConfigurablePlugins: []
  31. # Plugin \Drupal\ckeditor5\Plugin\CKEditor5Plugin\Language
  32. ckeditor5.plugin.ckeditor5_language:
  33. type: mapping
  34. label: 'Language'
  35. constraints:
  36. FullyValidatable: ~
  37. mapping:
  38. language_list:
  39. type: string
  40. label: 'Language list ID'
  41. constraints:
  42. # Configuring this does not make sense without the corresponding button.
  43. CKEditor5ToolbarItemDependencyConstraint:
  44. toolbarItem: textPartLanguage
  45. # Only the following values are accepted.
  46. Choice:
  47. # United Nations "official languages".
  48. - un
  49. # Drupal's predefined language list.
  50. - all
  51. # Languages configured at /admin/config/regional/language for the site.
  52. - site_configured
  53. # Plugin \Drupal\ckeditor5\Plugin\CKEditor5Plugin\Heading
  54. ckeditor5.plugin.ckeditor5_heading:
  55. type: mapping
  56. label: Headings
  57. constraints:
  58. FullyValidatable: ~
  59. mapping:
  60. enabled_headings:
  61. type: sequence
  62. orderby: value
  63. label: 'Enabled Headings'
  64. constraints:
  65. NotBlank:
  66. message: "Enable at least one heading, otherwise disable the Heading plugin."
  67. sequence:
  68. type: string
  69. label: 'Heading type'
  70. constraints:
  71. Choice:
  72. callback: \Drupal\ckeditor5\Plugin\CKEditor5Plugin\Heading::validChoices
  73. # Plugin \Drupal\ckeditor5\Plugin\CKEditor5Plugin\ImageResize
  74. ckeditor5.plugin.ckeditor5_imageResize:
  75. type: mapping
  76. label: Image Resize
  77. constraints:
  78. FullyValidatable: ~
  79. mapping:
  80. allow_resize:
  81. type: boolean
  82. label: 'Allow resize'
  83. constraints:
  84. NotNull: []
  85. # Plugin \Drupal\ckeditor5\Plugin\CKEditor5Plugin\SourceEditing
  86. ckeditor5.plugin.ckeditor5_sourceEditing:
  87. type: mapping
  88. label: Source Editing
  89. constraints:
  90. FullyValidatable: ~
  91. mapping:
  92. allowed_tags:
  93. type: sequence
  94. orderby: ~
  95. label: 'Allowed Tags'
  96. sequence:
  97. type: ckeditor5.element
  98. label: 'Allowed Tag'
  99. constraints:
  100. SourceEditingRedundantTags: []
  101. SourceEditingPreventSelfXssConstraint: []
  102. # Plugin \Drupal\ckeditor5\Plugin\CKEditor5Plugin\Alignment
  103. ckeditor5.plugin.ckeditor5_alignment:
  104. type: mapping
  105. label: Alignments
  106. constraints:
  107. FullyValidatable: ~
  108. mapping:
  109. enabled_alignments:
  110. type: sequence
  111. orderby: value
  112. label: 'Enabled Alignments'
  113. constraints:
  114. NotBlank:
  115. message: "Enable at least one alignment, otherwise disable the Alignment button."
  116. sequence:
  117. type: string
  118. label: 'Alignment type'
  119. constraints:
  120. Choice:
  121. - left
  122. - center
  123. - right
  124. - justify
  125. # Plugin \Drupal\ckeditor5\Plugin\CKEditor5Plugin\ListPlugin
  126. ckeditor5.plugin.ckeditor5_list:
  127. type: mapping
  128. label: List
  129. constraints:
  130. FullyValidatable: ~
  131. mapping:
  132. properties:
  133. type: mapping
  134. label: 'Allowed list attributes'
  135. mapping:
  136. reversed:
  137. type: boolean
  138. label: 'Allow reverse list'
  139. constraints:
  140. NotNull: []
  141. startIndex:
  142. type: boolean
  143. label: 'Allow start index'
  144. constraints:
  145. NotNull: []
  146. multiBlock:
  147. type: boolean
  148. label: 'Allow blocks to be created in list items'
  149. constraints:
  150. NotNull: []
  151. # Plugin \Drupal\ckeditor5\Plugin\CKEditor5Plugin\Media
  152. ckeditor5.plugin.media_media:
  153. type: mapping
  154. label: Media
  155. constraints:
  156. FullyValidatable: ~
  157. mapping:
  158. allow_view_mode_override:
  159. type: boolean
  160. label: 'Allow view mode override'
  161. constraints:
  162. NotNull: []
  163. # Plugin \Drupal\ckeditor5\Plugin\CKEditor5Plugin\CodeBlock
  164. ckeditor5.plugin.ckeditor5_codeBlock:
  165. type: mapping
  166. label: Code Block
  167. constraints:
  168. FullyValidatable: ~
  169. mapping:
  170. languages:
  171. type: sequence
  172. orderby: ~
  173. label: 'Languages'
  174. constraints:
  175. NotBlank:
  176. message: "Enable at least one language, otherwise disable the Code Block plugin."
  177. UniqueLabelInList:
  178. labelKey: label
  179. sequence:
  180. type: mapping
  181. label: 'Language'
  182. mapping:
  183. label:
  184. type: required_label
  185. label: 'Language label'
  186. language:
  187. type: string
  188. label: 'Language key'
  189. # Plugin \Drupal\ckeditor5\Plugin\CKEditor5Plugin\Style
  190. ckeditor5.plugin.ckeditor5_style:
  191. type: mapping
  192. label: Style
  193. constraints:
  194. FullyValidatable: ~
  195. mapping:
  196. styles:
  197. type: sequence
  198. orderby: ~
  199. label: 'Styles'
  200. constraints:
  201. NotBlank:
  202. message: "Enable at least one style, otherwise disable the Style plugin."
  203. UniqueLabelInList:
  204. labelKey: label
  205. sequence:
  206. type: mapping
  207. label: 'Style'
  208. mapping:
  209. label:
  210. type: required_label
  211. label: 'Style label'
  212. element:
  213. type: ckeditor5.element
  214. constraints:
  215. # Validate that this contains exactly 1 attribute (class) and >=1 class attr value.
  216. CKEditor5Element:
  217. requiredAttributes:
  218. -
  219. attributeName: class
  220. minAttributeValueCount: 1
  221. StyleSensibleElement: []
  222. label: 'Style tag + classes'

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