You are here

ckeditor5.ckeditor5.yml in Drupal 10

core/modules/ckeditor5/ckeditor5.ckeditor5.yml

File

core/modules/ckeditor5/ckeditor5.ckeditor5.yml
View source
  1. # CKEditor 5 Drupal plugin definitions.
  2. # @see this module's README.md for details on defining CKEditor 5 plugins in
  3. # Drupal.
  4. ckeditor5_essentials:
  5. ckeditor5:
  6. plugins:
  7. - drupalHtmlEngine.DrupalHtmlEngine
  8. - essentials.Essentials
  9. drupal:
  10. label: Essentials
  11. library: ckeditor5/drupal.ckeditor5.internal
  12. admin_library: ckeditor5/admin.internal
  13. toolbar_items:
  14. undo:
  15. label: Undo
  16. redo:
  17. label: Redo
  18. elements:
  19. - <br>
  20. conditions: []
  21. ckeditor5_paragraph:
  22. ckeditor5:
  23. plugins: [paragraph.Paragraph]
  24. drupal:
  25. label: Paragraph
  26. library: core/ckeditor5.internal
  27. admin_library: ckeditor5/admin.internal
  28. elements:
  29. - <p>
  30. ckeditor5_heading:
  31. ckeditor5:
  32. plugins: [heading.Heading]
  33. config:
  34. heading:
  35. # These are the options passed to the CKEditor heading constructor
  36. # @see https://ckeditor.com/docs/ckeditor5/latest/api/module_heading_heading-HeadingConfig.html#member-options
  37. # for details on what each of these config properties do.
  38. options:
  39. - { model: 'paragraph', title: 'Paragraph', class: 'ck-heading_paragraph' }
  40. - { model: 'heading1', view: 'h1', title: 'Heading 1', class: 'ck-heading_heading1' }
  41. - { model: 'heading2', view: 'h2', title: 'Heading 2', class: 'ck-heading_heading2' }
  42. - { model: 'heading3', view: 'h3', title: 'Heading 3', class: 'ck-heading_heading3' }
  43. - { model: 'heading4', view: 'h4', title: 'Heading 4', class: 'ck-heading_heading4' }
  44. - { model: 'heading5', view: 'h5', title: 'Heading 5', class: 'ck-heading_heading5' }
  45. - { model: 'heading6', view: 'h6', title: 'Heading 6', class: 'ck-heading_heading6' }
  46. drupal:
  47. label: Headings
  48. library: core/ckeditor5.internal
  49. admin_library: ckeditor5/admin.heading
  50. class: Drupal\ckeditor5\Plugin\CKEditor5Plugin\Heading
  51. toolbar_items:
  52. heading:
  53. label: Heading
  54. elements:
  55. - <h1>
  56. - <h2>
  57. - <h3>
  58. - <h4>
  59. - <h5>
  60. - <h6>
  61. ckeditor5_style:
  62. ckeditor5:
  63. plugins: [style.Style]
  64. drupal:
  65. label: Style
  66. library: core/ckeditor5.style
  67. admin_library: ckeditor5/admin.style
  68. class: Drupal\ckeditor5\Plugin\CKEditor5Plugin\Style
  69. toolbar_items:
  70. style:
  71. label: Style
  72. # This plugin is able to add any configured class on any tag that can be
  73. # created by some other CKEditor 5 plugin. Hence it indicates it allows all
  74. # classes on all tags. Its subset then restricts this to a concrete set of
  75. # tags, and a concrete set of classes.
  76. # @todo Update in https://www.drupal.org/project/drupal/issues/3280124
  77. # @see \Drupal\ckeditor5\Plugin\CKEditor5Plugin\Style::getElementsSubset()
  78. # @see \Drupal\ckeditor5\Plugin\Validation\Constraint\StyleSensibleElementConstraintValidator
  79. elements:
  80. - <$any-html5-element class>
  81. ckeditor5_arbitraryHtmlSupport:
  82. ckeditor5:
  83. plugins: [htmlSupport.GeneralHtmlSupport]
  84. config:
  85. htmlSupport:
  86. allow:
  87. -
  88. name:
  89. regexp:
  90. pattern: /.*/
  91. attributes: true
  92. classes: true
  93. styles: true
  94. drupal:
  95. label: Arbitrary HTML support
  96. elements: false
  97. library: core/ckeditor5.htmlSupport
  98. # @see \Drupal\ckeditor5\Plugin\CKEditor5PluginManagerInterface::getEnabledDefinitions()
  99. conditions: []
  100. ckeditor5_wildcardHtmlSupport:
  101. ckeditor5:
  102. plugins: [htmlSupport.GeneralHtmlSupport]
  103. drupal:
  104. label: Wildcard HTML support
  105. # @see \Drupal\ckeditor5\Plugin\CKEditor5PluginManager::getCKEditor5PluginConfig()
  106. elements: false
  107. library: core/ckeditor5.htmlSupport
  108. # @see \Drupal\ckeditor5\Plugin\CKEditor5PluginManagerInterface::getEnabledDefinitions()
  109. conditions: []
  110. # https://html.spec.whatwg.org/multipage/dom.html#attr-dir
  111. ckeditor5_globalAttributeDir:
  112. ckeditor5:
  113. plugins: [htmlSupport.GeneralHtmlSupport]
  114. config:
  115. htmlSupport:
  116. allow:
  117. -
  118. # @see \Drupal\ckeditor5\Plugin\CKEditor5Plugin\GlobalAttribute::getDynamicPluginConfig()
  119. name: ~
  120. attributes:
  121. - key: dir
  122. value:
  123. regexp:
  124. pattern: /^(ltr|rtl)$/
  125. drupal:
  126. label: Global `dir` attribute
  127. class: \Drupal\ckeditor5\Plugin\CKEditor5Plugin\GlobalAttribute
  128. # @see \Drupal\filter\Plugin\Filter\FilterHtml::getHTMLRestrictions()
  129. elements:
  130. - <* dir="ltr rtl">
  131. library: core/ckeditor5.htmlSupport
  132. conditions:
  133. filter: filter_html
  134. # https://html.spec.whatwg.org/multipage/dom.html#attr-lang
  135. ckeditor5_globalAttributeLang:
  136. ckeditor5:
  137. plugins: [htmlSupport.GeneralHtmlSupport]
  138. config:
  139. htmlSupport:
  140. allow:
  141. -
  142. # @see \Drupal\ckeditor5\Plugin\CKEditor5Plugin\GlobalAttribute::getDynamicPluginConfig()
  143. name: ~
  144. attributes: lang
  145. drupal:
  146. label: Global `lang` attribute
  147. class: \Drupal\ckeditor5\Plugin\CKEditor5Plugin\GlobalAttribute
  148. # @see \Drupal\filter\Plugin\Filter\FilterHtml::getHTMLRestrictions()
  149. elements:
  150. - <* lang>
  151. library: core/ckeditor5.htmlSupport
  152. conditions:
  153. filter: filter_html
  154. ckeditor5_specialCharacters:
  155. ckeditor5:
  156. plugins:
  157. - specialCharacters.SpecialCharacters
  158. - specialCharacters.SpecialCharactersEssentials
  159. drupal:
  160. label: Special characters
  161. library: core/ckeditor5.specialCharacters
  162. admin_library: ckeditor5/admin.specialCharacters
  163. toolbar_items:
  164. specialCharacters:
  165. label: Special characters
  166. elements: false
  167. ckeditor5_sourceEditing:
  168. ckeditor5:
  169. plugins:
  170. - sourceEditing.SourceEditing
  171. - htmlSupport.GeneralHtmlSupport
  172. drupal:
  173. label: Source editing
  174. class: \Drupal\ckeditor5\Plugin\CKEditor5Plugin\SourceEditing
  175. # This is the only CKEditor 5 plugin allowed to generate a superset of elements.
  176. # @see \Drupal\ckeditor5\Plugin\CKEditor5Plugin\SourceEditing::getElementsSubset()
  177. # @see \Drupal\ckeditor5\Plugin\CKEditor5PluginDefinition::validateDrupalAspects()
  178. # @see \Drupal\ckeditor5\Plugin\CKEditor5PluginManager::getProvidedElements()
  179. elements: []
  180. library: core/ckeditor5.sourceEditing
  181. admin_library: ckeditor5/admin.sourceEditing
  182. toolbar_items:
  183. sourceEditing:
  184. label: Source
  185. ckeditor5_bold:
  186. ckeditor5:
  187. plugins: [basicStyles.Bold]
  188. drupal:
  189. label: Bold
  190. library: core/ckeditor5.basic
  191. admin_library: ckeditor5/admin.basic
  192. toolbar_items:
  193. bold:
  194. label: Bold
  195. elements:
  196. - <strong>
  197. ckeditor5_emphasis:
  198. ckeditor5:
  199. plugins:
  200. - basicStyles.Italic
  201. - drupalEmphasis.DrupalEmphasis
  202. drupal:
  203. label: Emphasis
  204. library: ckeditor5/drupal.ckeditor5.emphasis
  205. admin_library: ckeditor5/admin.basic
  206. toolbar_items:
  207. italic:
  208. label: Italic
  209. elements:
  210. - <em>
  211. ckeditor5_underline:
  212. ckeditor5:
  213. plugins: [basicStyles.Underline]
  214. drupal:
  215. label: Underline
  216. library: core/ckeditor5.basic
  217. admin_library: ckeditor5/admin.basic
  218. toolbar_items:
  219. underline:
  220. label: Underline
  221. elements:
  222. - <u>
  223. ckeditor5_code:
  224. ckeditor5:
  225. plugins: [basicStyles.Code]
  226. drupal:
  227. label: Code
  228. library: core/ckeditor5.basic
  229. admin_library: ckeditor5/admin.basic
  230. toolbar_items:
  231. code:
  232. label: Code
  233. elements:
  234. - <code>
  235. ckeditor5_codeBlock:
  236. ckeditor5:
  237. plugins:
  238. - codeBlock.CodeBlock
  239. - htmlSupport.GeneralHtmlSupport
  240. config:
  241. # The CodeBlock plugin supports only `<pre><code>…</code></pre>`.
  242. # Configure GHS to support `<pre>…</pre>` markup as well.
  243. htmlSupport:
  244. allow:
  245. -
  246. name: pre
  247. drupal:
  248. label: Code Block
  249. library: ckeditor5/drupal.ckeditor5.codeBlock
  250. admin_library: ckeditor5/admin.codeBlock
  251. toolbar_items:
  252. codeBlock:
  253. label: Code Block
  254. elements:
  255. - <pre>
  256. - <code>
  257. - <code class="language-*">
  258. ckeditor5_strikethrough:
  259. ckeditor5:
  260. plugins: [basicStyles.Strikethrough]
  261. drupal:
  262. label: Strikethrough
  263. library: core/ckeditor5.basic
  264. admin_library: ckeditor5/admin.basic
  265. toolbar_items:
  266. strikethrough:
  267. label: Strikethrough
  268. elements:
  269. - <s>
  270. ckeditor5_subscript:
  271. ckeditor5:
  272. plugins: [basicStyles.Subscript]
  273. drupal:
  274. label: Subscript
  275. library: core/ckeditor5.basic
  276. admin_library: ckeditor5/admin.basic
  277. toolbar_items:
  278. subscript:
  279. label: Subscript
  280. elements:
  281. - <sub>
  282. ckeditor5_superscript:
  283. ckeditor5:
  284. plugins: [basicStyles.Superscript]
  285. drupal:
  286. label: Superscript
  287. library: core/ckeditor5.basic
  288. admin_library: ckeditor5/admin.basic
  289. toolbar_items:
  290. superscript:
  291. label: Superscript
  292. elements:
  293. - <sup>
  294. ckeditor5_blockquote:
  295. ckeditor5:
  296. plugins:
  297. - blockQuote.BlockQuote
  298. drupal:
  299. label: Block quote
  300. library: core/ckeditor5.blockquote
  301. admin_library: ckeditor5/admin.blockquote
  302. toolbar_items:
  303. blockQuote:
  304. label: Block quote
  305. elements:
  306. - <blockquote>
  307. ckeditor5_link:
  308. ckeditor5:
  309. plugins:
  310. - link.Link
  311. drupal:
  312. label: Link
  313. library: core/ckeditor5.link
  314. admin_library: ckeditor5/admin.link
  315. toolbar_items:
  316. link:
  317. label: Link
  318. elements:
  319. - <a>
  320. - <a href>
  321. ckeditor5_linkImage:
  322. ckeditor5:
  323. plugins:
  324. - link.LinkImage
  325. config:
  326. # Append the "Link" button to the image balloon toolbar.
  327. image:
  328. toolbar:
  329. - '|'
  330. - linkImage
  331. drupal:
  332. label: Linked Image
  333. elements: false
  334. conditions:
  335. plugins:
  336. - ckeditor5_link
  337. - ckeditor5_image
  338. ckeditor5_linkMedia:
  339. ckeditor5:
  340. plugins:
  341. - drupalMedia.DrupalLinkMedia
  342. config:
  343. # Append the "Link" button to the media balloon toolbar.
  344. drupalMedia:
  345. toolbar: [drupalLinkMedia]
  346. drupal:
  347. label: Linked Media
  348. elements: false
  349. conditions:
  350. plugins:
  351. - ckeditor5_link
  352. - media_media
  353. ckeditor5_list:
  354. ckeditor5:
  355. plugins:
  356. - list.DocumentList
  357. - list.DocumentListProperties
  358. config:
  359. list:
  360. properties:
  361. reversed: true
  362. startIndex: true
  363. # @todo Make this configurable in https://www.drupal.org/project/drupal/issues/3274635
  364. styles: false
  365. drupal:
  366. label: List
  367. library: core/ckeditor5.list
  368. admin_library: ckeditor5/admin.list
  369. class: Drupal\ckeditor5\Plugin\CKEditor5Plugin\ListPlugin
  370. toolbar_items:
  371. bulletedList:
  372. label: Bulleted list
  373. numberedList:
  374. label: Numbered list
  375. elements:
  376. - <ul>
  377. - <ol>
  378. - <ol reversed start>
  379. - <li>
  380. ckeditor5_horizontalLine:
  381. ckeditor5:
  382. plugins: [horizontalLine.HorizontalLine]
  383. drupal:
  384. label: Horizontal line
  385. library: core/ckeditor5.horizontalLine
  386. admin_library: ckeditor5/admin.horizontalLine
  387. toolbar_items:
  388. horizontalLine:
  389. label: Horizontal line
  390. elements:
  391. - <hr>
  392. ckeditor5_alignment:
  393. ckeditor5:
  394. plugins: [alignment.Alignment]
  395. config:
  396. # @see core/modules/system/css/components/align.module.css
  397. alignment:
  398. options:
  399. - name: left
  400. className: text-align-left
  401. - name: center
  402. className: text-align-center
  403. - name: right
  404. className: text-align-right
  405. - name: justify
  406. className: text-align-justify
  407. drupal:
  408. label: Alignment
  409. library: core/ckeditor5.alignment
  410. admin_library: ckeditor5/admin.alignment
  411. class: Drupal\ckeditor5\Plugin\CKEditor5Plugin\Alignment
  412. toolbar_items:
  413. alignment:
  414. label: Text alignment
  415. elements:
  416. - <$text-container class="text-align-left text-align-center text-align-right text-align-justify">
  417. ckeditor5_removeFormat:
  418. ckeditor5:
  419. plugins: [removeFormat.RemoveFormat]
  420. drupal:
  421. label: Remove Format
  422. library: core/ckeditor5.removeFormat
  423. admin_library: ckeditor5/admin.removeFormat
  424. toolbar_items:
  425. removeFormat:
  426. label: Remove Format
  427. elements: false
  428. ckeditor5_pasteFromOffice:
  429. ckeditor5:
  430. plugins: [pasteFromOffice.PasteFromOffice]
  431. drupal:
  432. label: Paste From Office
  433. library: core/ckeditor5.pasteFromOffice
  434. elements: false
  435. conditions: []
  436. ckeditor5_table:
  437. ckeditor5:
  438. plugins:
  439. - table.Table
  440. - table.TableToolbar
  441. - table.TableCaption
  442. - table.PlainTableOutput
  443. config:
  444. table:
  445. contentToolbar: [tableColumn, tableRow, mergeTableCells, toggleTableCaption]
  446. drupal:
  447. label: Table
  448. library: core/ckeditor5.table
  449. admin_library: ckeditor5/admin.table
  450. toolbar_items:
  451. insertTable:
  452. label: table
  453. elements:
  454. - <table>
  455. - <tr>
  456. - <td>
  457. - <td rowspan colspan>
  458. - <th>
  459. - <th rowspan colspan>
  460. - <thead>
  461. - <tbody>
  462. - <tfoot>
  463. - <caption>
  464. ckeditor5_image:
  465. ckeditor5:
  466. plugins:
  467. - image.Image
  468. - image.ImageToolbar
  469. - drupalImage.DrupalImage
  470. config:
  471. image:
  472. toolbar: [drupalImageAlternativeText]
  473. drupal:
  474. label: Image
  475. library: ckeditor5/drupal.ckeditor5.image
  476. elements:
  477. - <img>
  478. - <img src alt data-entity-uuid data-entity-type height width>
  479. conditions:
  480. toolbarItem: uploadImage
  481. imageUploadStatus: true
  482. ckeditor5_imageResize:
  483. ckeditor5:
  484. plugins:
  485. - image.ImageResize
  486. config:
  487. image:
  488. resizeUnit: '%'
  489. resizeOptions:
  490. -
  491. name: 'resizeImage:original'
  492. value: null
  493. toolbar: [resizeImage]
  494. drupal:
  495. label: Image resize
  496. class: \Drupal\ckeditor5\Plugin\CKEditor5Plugin\ImageResize
  497. elements: false
  498. conditions:
  499. requiresConfiguration:
  500. allow_resize: true
  501. plugins: [ckeditor5_image]
  502. ckeditor5_imageCaption:
  503. ckeditor5:
  504. plugins:
  505. - image.ImageCaption
  506. config:
  507. image:
  508. toolbar: [toggleImageCaption]
  509. drupal:
  510. label: Image caption
  511. elements:
  512. - <img data-caption>
  513. conditions:
  514. toolbarItem: uploadImage
  515. imageUploadStatus: true
  516. filter: filter_caption
  517. ckeditor5_imageAlign:
  518. ckeditor5:
  519. plugins:
  520. - image.ImageStyle
  521. config:
  522. image:
  523. toolbar:
  524. - '|'
  525. - 'imageStyle:block'
  526. - 'imageStyle:alignLeft'
  527. - 'imageStyle:alignCenter'
  528. - 'imageStyle:alignRight'
  529. - 'imageStyle:inline'
  530. - '|'
  531. styles:
  532. options:
  533. - inline
  534. - name: 'block'
  535. icon: 'left'
  536. title: 'Break text'
  537. - name: 'alignLeft'
  538. title: 'Align left and wrap text'
  539. - name: 'alignCenter'
  540. title: 'Align center and break text'
  541. - name: 'alignRight'
  542. title: 'Align right and wrap text'
  543. drupal:
  544. label: Image align
  545. elements:
  546. - <img data-align>
  547. conditions:
  548. toolbarItem: uploadImage
  549. imageUploadStatus: true
  550. filter: filter_align
  551. ckeditor5_indent:
  552. ckeditor5:
  553. plugins: [indent.Indent]
  554. drupal:
  555. label: Indent
  556. elements: false
  557. library: core/ckeditor5.indent
  558. admin_library: ckeditor5/admin.indent
  559. toolbar_items:
  560. indent:
  561. label: Indent
  562. outdent:
  563. label: Outdent
  564. ckeditor5_language:
  565. ckeditor5:
  566. plugins: [language.TextPartLanguage]
  567. drupal:
  568. label: Language
  569. library: ckeditor5/ckeditor5.language
  570. admin_library: ckeditor5/admin.language
  571. class: Drupal\ckeditor5\Plugin\CKEditor5Plugin\Language
  572. toolbar_items:
  573. textPartLanguage:
  574. label: Language
  575. elements:
  576. - <span lang dir>
  577. media_media:
  578. provider: media
  579. ckeditor5:
  580. plugins:
  581. - drupalMedia.DrupalMedia
  582. - drupalMedia.DrupalElementStyle
  583. config:
  584. drupalMedia:
  585. toolbar: [mediaImageTextAlternative]
  586. themeError:
  587. func:
  588. name: Drupal.theme
  589. args: [mediaEmbedPreviewError]
  590. invoke: true
  591. drupal:
  592. label: Media
  593. library: ckeditor5/drupal.ckeditor5.media
  594. class: Drupal\ckeditor5\Plugin\CKEditor5Plugin\Media
  595. elements:
  596. - <drupal-media>
  597. - <drupal-media data-entity-type data-entity-uuid alt data-view-mode>
  598. conditions:
  599. filter: media_embed
  600. ckeditor5_drupalMediaCaption:
  601. ckeditor5:
  602. plugins:
  603. - drupalMedia.DrupalMediaCaption
  604. config:
  605. drupalMedia:
  606. toolbar: [toggleDrupalMediaCaption]
  607. drupal:
  608. label: Media caption
  609. elements:
  610. - <drupal-media data-caption>
  611. conditions:
  612. filter: filter_caption
  613. plugins:
  614. - media_media
  615. media_mediaAlign:
  616. provider: media
  617. ckeditor5:
  618. plugins:
  619. - drupalMedia.DrupalElementStyle
  620. config:
  621. drupalElementStyles:
  622. align:
  623. - name: 'right'
  624. title: 'Align right and wrap text'
  625. icon: 'objectRight'
  626. attributeName: 'data-align'
  627. attributeValue: 'right'
  628. modelElements: [ 'drupalMedia' ]
  629. - name: 'left'
  630. title: 'Align left and wrap text'
  631. icon: 'objectLeft'
  632. attributeName: 'data-align'
  633. attributeValue: 'left'
  634. modelElements: [ 'drupalMedia' ]
  635. - name: 'center'
  636. title: 'Align center and break text'
  637. icon: 'objectCenter'
  638. attributeName: 'data-align'
  639. attributeValue: 'center'
  640. modelElements: ['drupalMedia']
  641. - name: 'breakText'
  642. title: 'Break text'
  643. icon: 'objectBlockLeft'
  644. isDefault: true
  645. modelElements: [ 'drupalMedia' ]
  646. drupalMedia:
  647. toolbar:
  648. - '|'
  649. - 'drupalElementStyle:align:breakText'
  650. - 'drupalElementStyle:align:left'
  651. - 'drupalElementStyle:align:center'
  652. - 'drupalElementStyle:align:right'
  653. - '|'
  654. drupal:
  655. label: Media align
  656. library: ckeditor5/drupal.ckeditor5.mediaAlign
  657. elements:
  658. - <drupal-media data-align>
  659. conditions:
  660. filter: filter_align
  661. plugins: [media_media]
  662. media_library_mediaLibrary:
  663. provider: media_library
  664. ckeditor5:
  665. plugins: []
  666. config:
  667. drupalMedia:
  668. openDialog:
  669. func:
  670. name: Drupal.ckeditor5.openDialog
  671. invoke: false
  672. dialogSettings:
  673. height: 75%
  674. dialogClass: media-library-widget-modal
  675. title: Add or select media
  676. drupal:
  677. label: Media Library
  678. elements: false
  679. admin_library: ckeditor5/admin.drupalmedia
  680. class: Drupal\ckeditor5\Plugin\CKEditor5Plugin\MediaLibrary
  681. library: editor/drupal.editor.dialog
  682. toolbar_items:
  683. drupalMedia:
  684. label: Drupal media
  685. conditions:
  686. filter: media_embed
  687. toolbarItem: drupalMedia