# Register image plugin for ckeditor
editor:
  config:
    importModules:
      -  '@netresearch/rte-ckeditor-image/Plugins/typo3image.js'

    contentsCss:
      - 'EXT:rte_ckeditor_image/Resources/Public/Css/editor-image-widget.css'

    # Fix linkProperties error: CKEditor 5 default includes 'linkProperties'
    # but TYPO3's Typo3Link plugin doesn't provide it
    link:
      decorators: []
      # Override default toolbar to remove 'linkProperties'
      toolbar: ['linkPreview', '|', 'editLink', 'unlink']

  externalPlugins:
    typo3image: { route: "rteckeditorimage_wizard_select_image" }

processing:
  allowTagsOutside:
    - img
    - a
    - figure
  allowTags:
    - figure
    - figcaption
  allowAttributes:
    - 'figure[class]'
    - 'a[class]'
    - 'a[data-link-params]'