ckeditor5.schema.yml

Same filename and directory in other branches
  1. 10 core/modules/ckeditor5/config/schema/ckeditor5.schema.yml
  2. 9 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. # @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ol#reversed
  139. label: 'Allow reverse list'
  140. constraints:
  141. NotNull: []
  142. startIndex:
  143. type: boolean
  144. # @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ol#start
  145. label: 'Allow start index'
  146. constraints:
  147. NotNull: []
  148. styles:
  149. type: boolean
  150. # @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ol#type
  151. label: 'Allow list style type'
  152. constraints:
  153. NotNull: []
  154. multiBlock:
  155. type: boolean
  156. label: 'Allow blocks to be created in list items'
  157. constraints:
  158. NotNull: []
  159. # Plugin \Drupal\ckeditor5\Plugin\CKEditor5Plugin\Media
  160. ckeditor5.plugin.media_media:
  161. type: mapping
  162. label: Media
  163. constraints:
  164. FullyValidatable: ~
  165. mapping:
  166. allow_view_mode_override:
  167. type: boolean
  168. label: 'Allow view mode override'
  169. constraints:
  170. NotNull: []
  171. # Plugin \Drupal\ckeditor5\Plugin\CKEditor5Plugin\CodeBlock
  172. ckeditor5.plugin.ckeditor5_codeBlock:
  173. type: mapping
  174. label: Code Block
  175. constraints:
  176. FullyValidatable: ~
  177. mapping:
  178. languages:
  179. type: sequence
  180. orderby: ~
  181. label: 'Languages'
  182. constraints:
  183. NotBlank:
  184. message: "Enable at least one language, otherwise disable the Code Block plugin."
  185. UniqueLabelInList:
  186. labelKey: label
  187. sequence:
  188. type: mapping
  189. label: 'Language'
  190. mapping:
  191. label:
  192. type: required_label
  193. label: 'Language label'
  194. language:
  195. type: string
  196. label: 'Language key'
  197. # Plugin \Drupal\ckeditor5\Plugin\CKEditor5Plugin\Style
  198. ckeditor5.plugin.ckeditor5_style:
  199. type: mapping
  200. label: Style
  201. constraints:
  202. FullyValidatable: ~
  203. mapping:
  204. styles:
  205. type: sequence
  206. orderby: ~
  207. label: 'Styles'
  208. constraints:
  209. NotBlank:
  210. message: "Enable at least one style, otherwise disable the Style plugin."
  211. UniqueLabelInList:
  212. labelKey: label
  213. sequence:
  214. type: mapping
  215. label: 'Style'
  216. mapping:
  217. label:
  218. type: required_label
  219. label: 'Style label'
  220. element:
  221. type: ckeditor5.element
  222. constraints:
  223. # Validate that this contains exactly 1 attribute (class) and >=1 class attr value.
  224. CKEditor5Element:
  225. requiredAttributes:
  226. -
  227. attributeName: class
  228. minAttributeValueCount: 1
  229. StyleSensibleElement: []
  230. label: 'Style tag + classes'

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