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. choices:
  48. # United Nations "official languages".
  49. - un
  50. # Drupal's predefined language list.
  51. - all
  52. # Languages configured at /admin/config/regional/language for the site.
  53. - site_configured
  54. # Plugin \Drupal\ckeditor5\Plugin\CKEditor5Plugin\Heading
  55. ckeditor5.plugin.ckeditor5_heading:
  56. type: mapping
  57. label: Headings
  58. constraints:
  59. FullyValidatable: ~
  60. mapping:
  61. enabled_headings:
  62. type: sequence
  63. orderby: value
  64. label: 'Enabled Headings'
  65. constraints:
  66. NotBlank:
  67. message: "Enable at least one heading, otherwise disable the Heading plugin."
  68. sequence:
  69. type: string
  70. label: 'Heading type'
  71. constraints:
  72. Choice:
  73. callback: \Drupal\ckeditor5\Plugin\CKEditor5Plugin\Heading::validChoices
  74. # Plugin \Drupal\ckeditor5\Plugin\CKEditor5Plugin\ImageResize
  75. ckeditor5.plugin.ckeditor5_imageResize:
  76. type: mapping
  77. label: Image Resize
  78. constraints:
  79. FullyValidatable: ~
  80. mapping:
  81. allow_resize:
  82. type: boolean
  83. label: 'Allow resize'
  84. constraints:
  85. NotNull: []
  86. # Plugin \Drupal\ckeditor5\Plugin\CKEditor5Plugin\SourceEditing
  87. ckeditor5.plugin.ckeditor5_sourceEditing:
  88. type: mapping
  89. label: Source Editing
  90. constraints:
  91. FullyValidatable: ~
  92. mapping:
  93. allowed_tags:
  94. type: sequence
  95. orderby: ~
  96. label: 'Allowed Tags'
  97. sequence:
  98. type: ckeditor5.element
  99. label: 'Allowed Tag'
  100. constraints:
  101. SourceEditingRedundantTags: []
  102. SourceEditingPreventSelfXssConstraint: []
  103. # Plugin \Drupal\ckeditor5\Plugin\CKEditor5Plugin\Alignment
  104. ckeditor5.plugin.ckeditor5_alignment:
  105. type: mapping
  106. label: Alignments
  107. constraints:
  108. FullyValidatable: ~
  109. mapping:
  110. enabled_alignments:
  111. type: sequence
  112. orderby: value
  113. label: 'Enabled Alignments'
  114. constraints:
  115. NotBlank:
  116. message: "Enable at least one alignment, otherwise disable the Alignment button."
  117. sequence:
  118. type: string
  119. label: 'Alignment type'
  120. constraints:
  121. Choice:
  122. choices:
  123. - left
  124. - center
  125. - right
  126. - justify
  127. # Plugin \Drupal\ckeditor5\Plugin\CKEditor5Plugin\ListPlugin
  128. ckeditor5.plugin.ckeditor5_list:
  129. type: mapping
  130. label: List
  131. constraints:
  132. FullyValidatable: ~
  133. mapping:
  134. properties:
  135. type: mapping
  136. label: 'Allowed list attributes'
  137. mapping:
  138. reversed:
  139. type: boolean
  140. # @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ol#reversed
  141. label: 'Allow reverse list'
  142. constraints:
  143. NotNull: []
  144. startIndex:
  145. type: boolean
  146. # @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ol#start
  147. label: 'Allow start index'
  148. constraints:
  149. NotNull: []
  150. styles:
  151. type: boolean
  152. # @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ol#type
  153. label: 'Allow list style type'
  154. constraints:
  155. NotNull: []
  156. multiBlock:
  157. type: boolean
  158. label: 'Allow blocks to be created in list items'
  159. constraints:
  160. NotNull: []
  161. # Plugin \Drupal\ckeditor5\Plugin\CKEditor5Plugin\Media
  162. ckeditor5.plugin.media_media:
  163. type: mapping
  164. label: Media
  165. constraints:
  166. FullyValidatable: ~
  167. mapping:
  168. allow_view_mode_override:
  169. type: boolean
  170. label: 'Allow view mode override'
  171. constraints:
  172. NotNull: []
  173. # Plugin \Drupal\ckeditor5\Plugin\CKEditor5Plugin\CodeBlock
  174. ckeditor5.plugin.ckeditor5_codeBlock:
  175. type: mapping
  176. label: Code Block
  177. constraints:
  178. FullyValidatable: ~
  179. mapping:
  180. languages:
  181. type: sequence
  182. orderby: ~
  183. label: 'Languages'
  184. constraints:
  185. NotBlank:
  186. message: "Enable at least one language, otherwise disable the Code Block plugin."
  187. UniqueLabelInList:
  188. labelKey: label
  189. sequence:
  190. type: mapping
  191. label: 'Language'
  192. mapping:
  193. label:
  194. type: required_label
  195. label: 'Language label'
  196. language:
  197. type: string
  198. label: 'Language key'
  199. # Plugin \Drupal\ckeditor5\Plugin\CKEditor5Plugin\Style
  200. ckeditor5.plugin.ckeditor5_style:
  201. type: mapping
  202. label: Style
  203. constraints:
  204. FullyValidatable: ~
  205. mapping:
  206. styles:
  207. type: sequence
  208. orderby: ~
  209. label: 'Styles'
  210. constraints:
  211. NotBlank:
  212. message: "Enable at least one style, otherwise disable the Style plugin."
  213. UniqueLabelInList:
  214. labelKey: label
  215. sequence:
  216. type: mapping
  217. label: 'Style'
  218. mapping:
  219. label:
  220. type: required_label
  221. label: 'Style label'
  222. element:
  223. type: ckeditor5.element
  224. constraints:
  225. # Validate that this contains exactly 1 attribute (class) and >=1 class attr value.
  226. CKEditor5Element:
  227. requiredAttributes:
  228. -
  229. attributeName: class
  230. minAttributeValueCount: 1
  231. StyleSensibleElement: []
  232. label: 'Style tag + classes'

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