editor.schema.yml

Same filename in other branches
  1. 9 core/modules/editor/config/schema/editor.schema.yml
  2. 8.9.x core/modules/editor/config/schema/editor.schema.yml
  3. 10 core/modules/editor/config/schema/editor.schema.yml
core/modules/editor/config/schema/editor.schema.yml

File

core/modules/editor/config/schema/editor.schema.yml

View source
  1. # Schema for the configuration files of the Editor module.
  2. editor.editor.*:
  3. type: config_entity
  4. label: 'Text editor'
  5. mapping:
  6. format:
  7. type: string
  8. label: 'Name'
  9. constraints:
  10. # @see \Drupal\editor\Entity\Editor::getFilterFormat()
  11. # @see \Drupal\editor\Entity\Editor::calculateDependencies()
  12. ConfigExists:
  13. prefix: 'filter.format.'
  14. editor:
  15. type: string
  16. label: 'Text editor'
  17. constraints:
  18. PluginExists:
  19. manager: plugin.manager.editor
  20. interface: Drupal\editor\Plugin\EditorPluginInterface
  21. settings:
  22. type: editor.settings.[%parent.editor]
  23. image_upload:
  24. type: editor.image_upload_settings.[status]
  25. constraints:
  26. FullyValidatable: ~
  27. editor.image_upload_settings.*:
  28. type: mapping
  29. label: 'Image uploads'
  30. constraints:
  31. FullyValidatable: ~
  32. mapping:
  33. status:
  34. type: boolean
  35. label: 'Status'
  36. editor.image_upload_settings.1:
  37. type: editor.image_upload_settings.*
  38. label: 'Image upload settings'
  39. constraints:
  40. FullyValidatable: ~
  41. mapping:
  42. scheme:
  43. type: string
  44. label: 'File storage'
  45. constraints:
  46. Choice:
  47. callback: \Drupal\editor\Entity\Editor::getValidStreamWrappers
  48. message: 'The file storage you selected is not a visible, readable and writable stream wrapper. Possible choices: %choices.'
  49. directory:
  50. type: string
  51. label: 'Upload directory'
  52. nullable: true
  53. constraints:
  54. # `""` is not allowed, but `null` is.
  55. NotBlank:
  56. allowNull: true
  57. Regex:
  58. # Forbid any kind of control character.
  59. # @see https://stackoverflow.com/a/66587087
  60. pattern: '/([^\PC])/u'
  61. match: false
  62. message: 'The image upload directory is not allowed to span multiple lines or contain control characters.'
  63. max_size:
  64. # @see \Drupal\file\Plugin\Validation\Constraint\FileSizeLimitConstraintValidator
  65. type: bytes
  66. label: 'Maximum file size'
  67. nullable: true
  68. max_dimensions:
  69. type: mapping
  70. label: 'Maximum dimensions'
  71. mapping:
  72. width:
  73. type: integer
  74. nullable: true
  75. label: 'Maximum width'
  76. constraints:
  77. Range:
  78. # @see editor_image_upload_settings_form()
  79. min: 1
  80. max: 99999
  81. height:
  82. type: integer
  83. nullable: true
  84. label: 'Maximum height'
  85. constraints:
  86. Range:
  87. # @see editor_image_upload_settings_form()
  88. min: 1
  89. max: 99999

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