ckeditor5.ckeditor5.yml

Same filename and directory in other branches
  1. 11.x core/modules/ckeditor5/ckeditor5.ckeditor5.yml
  2. 10 core/modules/ckeditor5/ckeditor5.ckeditor5.yml
  3. 9 core/modules/ckeditor5/ckeditor5.ckeditor5.yml
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/internal.drupal.ckeditor5.htmlEngine
  12. admin_library: ckeditor5/internal.admin.essentials
  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. admin_library: ckeditor5/internal.admin.essentials
  27. elements:
  28. - <p>
  29. ckeditor5_heading:
  30. ckeditor5:
  31. plugins: [heading.Heading]
  32. config:
  33. heading:
  34. # These are the options passed to the CKEditor heading constructor
  35. # @see https://ckeditor.com/docs/ckeditor5/latest/api/module_heading_heading-HeadingConfig.html#member-options
  36. # for details on what each of these config properties do.
  37. options:
  38. - { model: 'paragraph', title: 'Paragraph', class: 'ck-heading_paragraph' }
  39. - { model: 'heading1', view: 'h1', title: 'Heading 1', class: 'ck-heading_heading1' }
  40. - { model: 'heading2', view: 'h2', title: 'Heading 2', class: 'ck-heading_heading2' }
  41. - { model: 'heading3', view: 'h3', title: 'Heading 3', class: 'ck-heading_heading3' }
  42. - { model: 'heading4', view: 'h4', title: 'Heading 4', class: 'ck-heading_heading4' }
  43. - { model: 'heading5', view: 'h5', title: 'Heading 5', class: 'ck-heading_heading5' }
  44. - { model: 'heading6', view: 'h6', title: 'Heading 6', class: 'ck-heading_heading6' }
  45. drupal:
  46. label: Headings
  47. admin_library: ckeditor5/internal.admin.heading
  48. class: Drupal\ckeditor5\Plugin\CKEditor5Plugin\Heading
  49. toolbar_items:
  50. heading:
  51. label: Heading
  52. elements:
  53. - <h1>
  54. - <h2>
  55. - <h3>
  56. - <h4>
  57. - <h5>
  58. - <h6>
  59. ckeditor5_style:
  60. ckeditor5:
  61. plugins: [style.Style]
  62. drupal:
  63. label: Style
  64. admin_library: ckeditor5/internal.admin.style
  65. class: Drupal\ckeditor5\Plugin\CKEditor5Plugin\Style
  66. toolbar_items:
  67. style:
  68. label: Style
  69. # This plugin is able to add any configured class on any tag that can be
  70. # created by some other CKEditor 5 plugin. Hence it indicates it allows all
  71. # classes on all tags. Its subset then restricts this to a concrete set of
  72. # tags, and a concrete set of classes.
  73. # @todo Update in https://www.drupal.org/project/drupal/issues/3280124
  74. # @see \Drupal\ckeditor5\Plugin\CKEditor5Plugin\Style::getElementsSubset()
  75. # @see \Drupal\ckeditor5\Plugin\Validation\Constraint\StyleSensibleElementConstraintValidator
  76. elements:
  77. - <$any-html5-element class>
  78. ckeditor5_htmlComments:
  79. ckeditor5:
  80. plugins:
  81. - htmlSupport.HtmlComment
  82. drupal:
  83. label: HTML Comment support
  84. elements: false
  85. # @see \Drupal\ckeditor5\Plugin\CKEditor5PluginManagerInterface::getEnabledDefinitions()
  86. conditions: []
  87. ckeditor5_arbitraryHtmlSupport:
  88. ckeditor5:
  89. plugins: [htmlSupport.GeneralHtmlSupport]
  90. config:
  91. htmlSupport:
  92. allow:
  93. -
  94. name:
  95. regexp:
  96. pattern: /.*/
  97. attributes: true
  98. classes: true
  99. styles: true
  100. drupal:
  101. label: Arbitrary HTML support
  102. elements: false
  103. # @see \Drupal\ckeditor5\Plugin\CKEditor5PluginManagerInterface::getEnabledDefinitions()
  104. conditions: []
  105. ckeditor5_wildcardHtmlSupport:
  106. ckeditor5:
  107. plugins: [htmlSupport.GeneralHtmlSupport]
  108. drupal:
  109. label: Wildcard HTML support
  110. # @see \Drupal\ckeditor5\Plugin\CKEditor5PluginManager::getCKEditor5PluginConfig()
  111. elements: false
  112. # @see \Drupal\ckeditor5\Plugin\CKEditor5PluginManagerInterface::getEnabledDefinitions()
  113. conditions: []
  114. # https://html.spec.whatwg.org/multipage/dom.html#attr-dir
  115. ckeditor5_globalAttributeDir:
  116. ckeditor5:
  117. plugins: [htmlSupport.GeneralHtmlSupport]
  118. config:
  119. htmlSupport:
  120. allow:
  121. -
  122. # @see \Drupal\ckeditor5\Plugin\CKEditor5Plugin\GlobalAttribute::getDynamicPluginConfig()
  123. name: ~
  124. attributes:
  125. - key: dir
  126. value:
  127. regexp:
  128. pattern: /^(ltr|rtl)$/
  129. drupal:
  130. label: Global `dir` attribute
  131. class: \Drupal\ckeditor5\Plugin\CKEditor5Plugin\GlobalAttribute
  132. # @see \Drupal\filter\Plugin\Filter\FilterHtml::getHTMLRestrictions()
  133. elements:
  134. - <* dir="ltr rtl">
  135. conditions:
  136. filter: filter_html
  137. # https://html.spec.whatwg.org/multipage/dom.html#attr-lang
  138. ckeditor5_globalAttributeLang:
  139. ckeditor5:
  140. plugins: [htmlSupport.GeneralHtmlSupport]
  141. config:
  142. htmlSupport:
  143. allow:
  144. -
  145. # @see \Drupal\ckeditor5\Plugin\CKEditor5Plugin\GlobalAttribute::getDynamicPluginConfig()
  146. name: ~
  147. attributes: lang
  148. drupal:
  149. label: Global `lang` attribute
  150. class: \Drupal\ckeditor5\Plugin\CKEditor5Plugin\GlobalAttribute
  151. # @see \Drupal\filter\Plugin\Filter\FilterHtml::getHTMLRestrictions()
  152. elements:
  153. - <* lang>
  154. conditions:
  155. filter: filter_html
  156. ckeditor5_specialCharacters:
  157. ckeditor5:
  158. plugins:
  159. - specialCharacters.SpecialCharacters
  160. - specialCharacters.SpecialCharactersEssentials
  161. drupal:
  162. label: Special characters
  163. admin_library: ckeditor5/internal.admin.specialCharacters
  164. toolbar_items:
  165. specialCharacters:
  166. label: Special characters
  167. elements: false
  168. ckeditor5_sourceEditing:
  169. ckeditor5:
  170. plugins:
  171. - sourceEditing.SourceEditing
  172. - htmlSupport.GeneralHtmlSupport
  173. drupal:
  174. label: Source editing
  175. class: \Drupal\ckeditor5\Plugin\CKEditor5Plugin\SourceEditing
  176. # This is the only CKEditor 5 plugin allowed to generate a superset of elements.
  177. # @see \Drupal\ckeditor5\Plugin\CKEditor5Plugin\SourceEditing::getElementsSubset()
  178. # @see \Drupal\ckeditor5\Plugin\CKEditor5PluginDefinition::validateDrupalAspects()
  179. # @see \Drupal\ckeditor5\Plugin\CKEditor5PluginManager::getProvidedElements()
  180. elements: []
  181. admin_library: ckeditor5/internal.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. admin_library: ckeditor5/internal.admin.basic
  191. toolbar_items:
  192. bold:
  193. label: Bold
  194. elements:
  195. - <strong>
  196. ckeditor5_emphasis:
  197. ckeditor5:
  198. plugins:
  199. - basicStyles.Italic
  200. - drupalEmphasis.DrupalEmphasis
  201. drupal:
  202. label: Emphasis
  203. library: ckeditor5/internal.drupal.ckeditor5.emphasis
  204. admin_library: ckeditor5/internal.admin.basic
  205. toolbar_items:
  206. italic:
  207. label: Italic
  208. elements:
  209. - <em>
  210. ckeditor5_underline:
  211. ckeditor5:
  212. plugins: [basicStyles.Underline]
  213. drupal:
  214. label: Underline
  215. admin_library: ckeditor5/internal.admin.basic
  216. toolbar_items:
  217. underline:
  218. label: Underline
  219. elements:
  220. - <u>
  221. ckeditor5_code:
  222. ckeditor5:
  223. plugins: [basicStyles.Code]
  224. drupal:
  225. label: Code
  226. admin_library: ckeditor5/internal.admin.basic
  227. toolbar_items:
  228. code:
  229. label: Code
  230. elements:
  231. - <code>
  232. ckeditor5_codeBlock:
  233. ckeditor5:
  234. plugins:
  235. - codeBlock.CodeBlock
  236. - htmlSupport.GeneralHtmlSupport
  237. config:
  238. # The CodeBlock plugin supports only `<pre><code>…</code></pre>`.
  239. # Configure GHS to support `<pre>…</pre>` markup as well.
  240. htmlSupport:
  241. allow:
  242. -
  243. name: pre
  244. drupal:
  245. label: Code Block
  246. library: ckeditor5/internal.drupal.ckeditor5.codeBlock
  247. admin_library: ckeditor5/internal.admin.codeBlock
  248. class: Drupal\ckeditor5\Plugin\CKEditor5Plugin\CodeBlock
  249. toolbar_items:
  250. codeBlock:
  251. label: Code Block
  252. elements:
  253. - <pre>
  254. - <code>
  255. - <code class="language-*">
  256. ckeditor5_strikethrough:
  257. ckeditor5:
  258. plugins: [basicStyles.Strikethrough]
  259. drupal:
  260. label: Strikethrough
  261. admin_library: ckeditor5/internal.admin.basic
  262. toolbar_items:
  263. strikethrough:
  264. label: Strikethrough
  265. elements:
  266. - <s>
  267. ckeditor5_subscript:
  268. ckeditor5:
  269. plugins: [basicStyles.Subscript]
  270. drupal:
  271. label: Subscript
  272. admin_library: ckeditor5/internal.admin.basic
  273. toolbar_items:
  274. subscript:
  275. label: Subscript
  276. elements:
  277. - <sub>
  278. ckeditor5_superscript:
  279. ckeditor5:
  280. plugins: [basicStyles.Superscript]
  281. drupal:
  282. label: Superscript
  283. admin_library: ckeditor5/internal.admin.basic
  284. toolbar_items:
  285. superscript:
  286. label: Superscript
  287. elements:
  288. - <sup>
  289. ckeditor5_blockquote:
  290. ckeditor5:
  291. plugins:
  292. - blockQuote.BlockQuote
  293. drupal:
  294. label: Block quote
  295. admin_library: ckeditor5/internal.admin.blockquote
  296. toolbar_items:
  297. blockQuote:
  298. label: Block quote
  299. elements:
  300. - <blockquote>
  301. ckeditor5_link:
  302. ckeditor5:
  303. plugins:
  304. - link.Link
  305. config:
  306. link:
  307. # @see https://ckeditor.com/docs/ckeditor5/latest/features/link.html#adding-default-link-protocol-to-external-links
  308. defaultProtocol: 'https://'
  309. drupal:
  310. label: Link
  311. admin_library: ckeditor5/internal.admin.link
  312. toolbar_items:
  313. link:
  314. label: Link
  315. elements:
  316. - <a>
  317. - <a href>
  318. ckeditor5_link_entity_suggestions:
  319. ckeditor5:
  320. plugins:
  321. - drupalEntityLinkSuggestions.DrupalEntityLinkSuggestions
  322. drupal:
  323. label: Entity links
  324. class: \Drupal\ckeditor5\Plugin\CKEditor5Plugin\EntityLinkSuggestions
  325. library: ckeditor5/internal.drupal.ckeditor5.link-entity-suggestions
  326. elements:
  327. - <a data-entity-type data-entity-uuid data-entity-metadata>
  328. conditions:
  329. filter: entity_links
  330. plugins:
  331. - ckeditor5_link
  332. ckeditor5_linkImage:
  333. ckeditor5:
  334. plugins:
  335. - link.LinkImage
  336. config:
  337. # Append the "Link" button to the image balloon toolbar.
  338. image:
  339. toolbar:
  340. - '|'
  341. - linkImage
  342. drupal:
  343. label: Linked Image
  344. elements: false
  345. conditions:
  346. plugins:
  347. - ckeditor5_link
  348. - ckeditor5_image
  349. ckeditor5_entityLinkImage:
  350. ckeditor5:
  351. plugins: []
  352. drupal:
  353. label: Entity-Linked Image
  354. elements:
  355. - <img data-link-entity-type data-link-entity-uuid>
  356. conditions:
  357. plugins:
  358. - ckeditor5_link_entity_suggestions
  359. - ckeditor5_image
  360. ckeditor5_linkMedia:
  361. ckeditor5:
  362. plugins:
  363. - drupalMedia.DrupalLinkMedia
  364. config:
  365. # Append the "Link" button to the media balloon toolbar.
  366. drupalMedia:
  367. toolbar: [drupalLinkMedia]
  368. drupal:
  369. label: Linked Media
  370. elements: false
  371. conditions:
  372. plugins:
  373. - ckeditor5_link
  374. - media_media
  375. ckeditor5_list:
  376. ckeditor5:
  377. plugins:
  378. - list.List
  379. - list.ListProperties
  380. # @see \Drupal\ckeditor5\Plugin\CKEditor5Plugin\ListPlugin::getDynamicPluginConfig()
  381. config: {}
  382. drupal:
  383. label: List
  384. admin_library: ckeditor5/internal.admin.list
  385. class: Drupal\ckeditor5\Plugin\CKEditor5Plugin\ListPlugin
  386. toolbar_items:
  387. bulletedList:
  388. label: Bulleted list
  389. numberedList:
  390. label: Numbered list
  391. elements:
  392. - <ul>
  393. - <ol>
  394. - <ol reversed start>
  395. - <li>
  396. - <ol type>
  397. - <ul type>
  398. ckeditor5_horizontalLine:
  399. ckeditor5:
  400. plugins: [horizontalLine.HorizontalLine]
  401. drupal:
  402. label: Horizontal line
  403. admin_library: ckeditor5/internal.admin.horizontalLine
  404. toolbar_items:
  405. horizontalLine:
  406. label: Horizontal line
  407. elements:
  408. - <hr>
  409. ckeditor5_alignment:
  410. ckeditor5:
  411. plugins: [alignment.Alignment]
  412. config:
  413. # @see core/modules/system/css/components/align.module.css
  414. alignment:
  415. options:
  416. - name: left
  417. className: text-align-left
  418. - name: center
  419. className: text-align-center
  420. - name: right
  421. className: text-align-right
  422. - name: justify
  423. className: text-align-justify
  424. drupal:
  425. label: Alignment
  426. admin_library: ckeditor5/internal.admin.alignment
  427. class: Drupal\ckeditor5\Plugin\CKEditor5Plugin\Alignment
  428. toolbar_items:
  429. alignment:
  430. label: Text alignment
  431. elements:
  432. - <$text-container class="text-align-left text-align-center text-align-right text-align-justify">
  433. ckeditor5_autoformat:
  434. ckeditor5:
  435. plugins:
  436. - autoformat.Autoformat
  437. drupal:
  438. label: Autoformat
  439. elements: false
  440. ckeditor5_removeFormat:
  441. ckeditor5:
  442. plugins: [removeFormat.RemoveFormat]
  443. drupal:
  444. label: Remove Format
  445. admin_library: ckeditor5/internal.admin.removeFormat
  446. toolbar_items:
  447. removeFormat:
  448. label: Remove Format
  449. elements: false
  450. ckeditor5_pasteFromOffice:
  451. ckeditor5:
  452. plugins: [pasteFromOffice.PasteFromOffice]
  453. drupal:
  454. label: Paste From Office
  455. elements: false
  456. conditions: []
  457. ckeditor5_table:
  458. ckeditor5:
  459. plugins:
  460. - table.Table
  461. - table.TableToolbar
  462. - table.TableCaption
  463. - table.PlainTableOutput
  464. config:
  465. table:
  466. contentToolbar: [tableColumn, tableRow, mergeTableCells, toggleTableCaption]
  467. drupal:
  468. label: Table
  469. admin_library: ckeditor5/internal.admin.table
  470. toolbar_items:
  471. insertTable:
  472. label: table
  473. elements:
  474. - <table>
  475. - <tr>
  476. - <td>
  477. - <td rowspan colspan>
  478. - <th>
  479. - <th rowspan colspan>
  480. - <thead>
  481. - <tbody>
  482. - <tfoot>
  483. - <caption>
  484. ckeditor5_table_properties:
  485. ckeditor5:
  486. plugins:
  487. - table.TableProperties
  488. config:
  489. table:
  490. contentToolbar: [tableProperties]
  491. drupal:
  492. label: Table properties
  493. library: ckeditor5/internal.drupal.ckeditor5.table
  494. conditions:
  495. plugins:
  496. - ckeditor5_table
  497. # When arbitrary HTML is already allowed, it's harmless to enable CKEditor 5's UI for table properties.
  498. - ckeditor5_arbitraryHtmlSupport
  499. elements:
  500. - <table style>
  501. ckeditor5_table_cell_properties:
  502. ckeditor5:
  503. plugins:
  504. - table.TableCellProperties
  505. config:
  506. table:
  507. contentToolbar: [tableCellProperties]
  508. drupal:
  509. label: Table cell properties
  510. library: ckeditor5/internal.drupal.ckeditor5.table
  511. conditions:
  512. plugins:
  513. - ckeditor5_table
  514. # When arbitrary HTML is already allowed, it's harmless to enable CKEditor 5's UI for table cell properties.
  515. - ckeditor5_arbitraryHtmlSupport
  516. elements:
  517. - <td style>
  518. - <td rowspan colspan style>
  519. - <th style>
  520. - <th rowspan colspan style>
  521. ckeditor5_image:
  522. ckeditor5:
  523. plugins:
  524. - image.Image
  525. - image.ImageToolbar
  526. - drupalImage.DrupalImage
  527. - drupalImage.DrupalInsertImage
  528. config:
  529. image:
  530. toolbar: [drupalImageAlternativeText]
  531. insert:
  532. # Determine image type (inline or block) by insertion context.
  533. type: auto
  534. integrations: []
  535. drupal:
  536. label: Image
  537. class: \Drupal\ckeditor5\Plugin\CKEditor5Plugin\Image
  538. library: ckeditor5/internal.drupal.ckeditor5.image
  539. admin_library: ckeditor5/internal.admin.image
  540. elements:
  541. - <img>
  542. - <img src alt height width>
  543. toolbar_items:
  544. drupalInsertImage:
  545. label: Image
  546. conditions:
  547. toolbarItem: drupalInsertImage
  548. ckeditor5_imageUpload:
  549. ckeditor5:
  550. plugins:
  551. - image.ImageUpload
  552. - drupalImage.DrupalImageUpload
  553. config:
  554. image:
  555. upload:
  556. # The strings in this array should be IANA media type Names, without the "image/" prefix. So: image subtypes.
  557. # https://www.iana.org/assignments/media-types/media-types.xhtml#image
  558. types: ["jpeg", "png", "gif"]
  559. drupal:
  560. label: Image Upload
  561. elements:
  562. - <img data-entity-uuid data-entity-type>
  563. conditions:
  564. imageUploadStatus: true
  565. plugins: [ckeditor5_image]
  566. ckeditor5_imageUrl:
  567. ckeditor5:
  568. plugins:
  569. - image.ImageInsertViaUrl
  570. drupal:
  571. label: Image URL
  572. elements: false
  573. conditions:
  574. imageUploadStatus: false
  575. plugins: [ckeditor5_image]
  576. ckeditor5_imageResize:
  577. ckeditor5:
  578. plugins:
  579. - image.ImageResize
  580. config:
  581. image:
  582. resizeUnit: 'px'
  583. resizeOptions:
  584. -
  585. name: 'resizeImage:original'
  586. value: null
  587. toolbar: [resizeImage]
  588. drupal:
  589. label: Image resize
  590. class: \Drupal\ckeditor5\Plugin\CKEditor5Plugin\ImageResize
  591. elements: false
  592. conditions:
  593. requiresConfiguration:
  594. allow_resize: true
  595. plugins: [ckeditor5_image]
  596. ckeditor5_imageCaption:
  597. ckeditor5:
  598. plugins:
  599. - image.ImageCaption
  600. config:
  601. image:
  602. toolbar: [toggleImageCaption]
  603. drupal:
  604. label: Image caption
  605. elements:
  606. - <img data-caption>
  607. conditions:
  608. filter: filter_caption
  609. plugins: [ckeditor5_image]
  610. ckeditor5_imageAlign:
  611. ckeditor5:
  612. plugins:
  613. - image.ImageStyle
  614. config:
  615. image:
  616. toolbar:
  617. - '|'
  618. - 'imageStyle:block'
  619. - 'imageStyle:alignLeft'
  620. - 'imageStyle:alignCenter'
  621. - 'imageStyle:alignRight'
  622. - 'imageStyle:inline'
  623. - '|'
  624. styles:
  625. options:
  626. - inline
  627. - name: 'block'
  628. icon: 'left'
  629. title: 'Break text'
  630. - name: 'alignLeft'
  631. title: 'Align left and wrap text'
  632. - name: 'alignCenter'
  633. title: 'Align center and break text'
  634. - name: 'alignRight'
  635. title: 'Align right and wrap text'
  636. drupal:
  637. label: Image align
  638. elements:
  639. - <img data-align>
  640. conditions:
  641. filter: filter_align
  642. plugins: [ckeditor5_image]
  643. ckeditor5_indent:
  644. ckeditor5:
  645. plugins: [indent.Indent]
  646. drupal:
  647. label: Indent
  648. elements: false
  649. admin_library: ckeditor5/internal.admin.indent
  650. toolbar_items:
  651. indent:
  652. label: Indent
  653. outdent:
  654. label: Outdent
  655. ckeditor5_language:
  656. ckeditor5:
  657. plugins: [language.TextPartLanguage]
  658. drupal:
  659. label: Language
  660. library: ckeditor5/internal.ckeditor5.language
  661. admin_library: ckeditor5/internal.admin.language
  662. class: Drupal\ckeditor5\Plugin\CKEditor5Plugin\Language
  663. toolbar_items:
  664. textPartLanguage:
  665. label: Language
  666. elements:
  667. - <span lang dir>
  668. ckeditor5_showBlocks:
  669. ckeditor5:
  670. plugins: [showBlocks.ShowBlocks]
  671. drupal:
  672. label: Show blocks
  673. admin_library: ckeditor5/internal.admin.showBlocks
  674. toolbar_items:
  675. showBlocks:
  676. label: Show blocks
  677. elements: false
  678. ckeditor5_fullscreen:
  679. ckeditor5:
  680. plugins: [fullscreen.Fullscreen]
  681. drupal:
  682. label: Fullscreen
  683. admin_library: ckeditor5/internal.admin.fullscreen
  684. toolbar_items:
  685. fullscreen:
  686. label: Fullscreen
  687. elements: false
  688. media_media:
  689. provider: media
  690. ckeditor5:
  691. plugins:
  692. - drupalMedia.DrupalMedia
  693. - drupalMedia.DrupalElementStyle
  694. config:
  695. drupalMedia:
  696. toolbar: [mediaImageTextAlternative]
  697. themeError:
  698. func:
  699. name: Drupal.theme
  700. args: [mediaEmbedPreviewError]
  701. invoke: true
  702. drupal:
  703. label: Media
  704. library: ckeditor5/internal.drupal.ckeditor5.media
  705. class: Drupal\ckeditor5\Plugin\CKEditor5Plugin\Media
  706. elements:
  707. - <drupal-media>
  708. - <drupal-media data-entity-type data-entity-uuid alt>
  709. - <drupal-media data-view-mode>
  710. conditions:
  711. filter: media_embed
  712. ckeditor5_drupalMediaCaption:
  713. ckeditor5:
  714. plugins:
  715. - drupalMedia.DrupalMediaCaption
  716. config:
  717. drupalMedia:
  718. toolbar: [toggleDrupalMediaCaption]
  719. drupal:
  720. label: Media caption
  721. elements:
  722. - <drupal-media data-caption>
  723. conditions:
  724. filter: filter_caption
  725. plugins:
  726. - media_media
  727. media_mediaAlign:
  728. provider: media
  729. ckeditor5:
  730. plugins:
  731. - drupalMedia.DrupalElementStyle
  732. config:
  733. drupalElementStyles:
  734. align:
  735. - name: 'right'
  736. title: 'Align right and wrap text'
  737. icon: 'IconObjectInlineRight'
  738. attributeName: 'data-align'
  739. attributeValue: 'right'
  740. modelElements: [ 'drupalMedia' ]
  741. - name: 'left'
  742. title: 'Align left and wrap text'
  743. icon: 'IconObjectInlineLeft'
  744. attributeName: 'data-align'
  745. attributeValue: 'left'
  746. modelElements: [ 'drupalMedia' ]
  747. - name: 'center'
  748. title: 'Align center and break text'
  749. icon: 'IconObjectCenter'
  750. attributeName: 'data-align'
  751. attributeValue: 'center'
  752. modelElements: ['drupalMedia']
  753. - name: 'breakText'
  754. title: 'Break text'
  755. icon: 'IconObjectLeft'
  756. isDefault: true
  757. modelElements: [ 'drupalMedia' ]
  758. drupalMedia:
  759. toolbar:
  760. - '|'
  761. - 'drupalElementStyle:align:breakText'
  762. - 'drupalElementStyle:align:left'
  763. - 'drupalElementStyle:align:center'
  764. - 'drupalElementStyle:align:right'
  765. - '|'
  766. drupal:
  767. label: Media align
  768. library: ckeditor5/internal.drupal.ckeditor5.mediaAlign
  769. elements:
  770. - <drupal-media data-align>
  771. conditions:
  772. filter: filter_align
  773. plugins: [media_media]
  774. media_library_mediaLibrary:
  775. provider: media_library
  776. ckeditor5:
  777. plugins: []
  778. config:
  779. drupalMedia:
  780. openDialog:
  781. func:
  782. name: Drupal.ckeditor5.openDialog
  783. invoke: false
  784. dialogSettings:
  785. classes:
  786. ui-dialog: media-library-widget-modal
  787. height: 75%
  788. drupal:
  789. label: Media Library
  790. elements: false
  791. admin_library: ckeditor5/internal.admin.drupalmedia
  792. class: Drupal\ckeditor5\Plugin\CKEditor5Plugin\MediaLibrary
  793. library: editor/drupal.editor.dialog
  794. toolbar_items:
  795. drupalMedia:
  796. label: Drupal media
  797. conditions:
  798. filter: media_embed
  799. toolbarItem: drupalMedia
  800. ckeditor5_entityLinkMedia:
  801. ckeditor5:
  802. plugins: []
  803. drupal:
  804. label: Entity-Linked Media
  805. elements:
  806. # The drupalMedia.DrupalLinkMedia CKEditor 5 plugin automatically supports the
  807. # Entity Link Suggestions functionality when it is enabled.
  808. - <drupal-media data-link-entity-type data-link-entity-uuid data-link-entity-metadata>
  809. conditions:
  810. plugins:
  811. - ckeditor5_link_entity_suggestions
  812. - media_media

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