# Load default processing options
imports:
  - { resource: "EXT:rte_ckeditor/Configuration/RTE/Processing.yaml" }
  - { resource: "EXT:rte_ckeditor/Configuration/RTE/Editor/Base.yaml" }
  - { resource: "EXT:rte_ckeditor/Configuration/RTE/Editor/Plugins.yaml" }
  - { resource: "EXT:energize/Configuration/Yaml/RichTextButtons.yaml" }
  - { resource: "EXT:energize/Configuration/Yaml/FA5/PluginFA5.yaml" }

# Add configuration for the editor
# For complete documentation see http://docs.ckeditor.com/#!/api/CKEDITOR.config
editor:
  filter:
    allowedContent:
      a:
        classes: "*"
      td:
        classes: "*"
  config:
    ui:
      DPFontAwesome:
        css:  "EXT:energize/Resources/Public/Styles/fontawesome.css"
    toolbar:
      items:
        - '|'
        - DPFontAwesome
    contentsCss: ["EXT:energize/Resources/Public/Styles/main.css?v1", "EXT:energize/Resources/Public/Styles/rte.css?v1"]

    stylesSet:
      - { name: "Anleser", element: "p", attributes: { class: 'lead' }}
      - { name: "Button", element: "a", attributes: { class: 'btn btn-primary'}}
      - { name: "Button Secondary", element: "a", attributes: { class: 'btn btn-secondary'}}
      - { name: "Link", element: "a", attributes: { class: 'link'}}
      - { name: "h1 Style", element: "p", attributes: { class: 'h1' }}
      - { name: "h2 Style", element: "p", attributes: { class: 'h2' }}
      - { name: "h3 Style", element: "p", attributes: { class: 'h3' }}
      - { name: "h4 Style", element: "p", attributes: { class: 'h4' }}
      - { name: "h5 Style", element: "p", attributes: { class: 'h5' }}
      - { name: "h6 Style", element: "p", attributes: { class: 'h6' }}

    format_tags: "p;h1;h2;h3;h4;h5;h6"

    toolbarGroups:
      - { name: styles, groups: [ styles, format, insert] }
      - { name: basicstyles, groups: [ basicstyles ] }
      - { name: paragraph, groups: [ list, indent, align ] }
      - { name: links, groups: [ links ] }
      - { name: clipboard, groups: [ clipboard, cleanup, undo ] }
      - { name: editing, groups: [ spellchecker ] }
      - { name: insert, groups: [ insert ] }
      - { name: tools, groups: [ table, specialchar ] }
      - { name: document, groups: [ mode ] }
      - { name: DPFontAwesome, groups: [ DPFontAwesome ] }
      -
    justifyClasses:
      - text-left
      - text-center
      - text-right
      - text-justify

    extraPlugins:
      - justify

    removePlugins:
      - image

    removeButtons:
      - Anchor
      - Underline
      - Strike

    # Mandatory for font awesome integration
    coreStyles_italic:
      element: 'i'
      overrides: 'span'

    # Mandatory for font awesome integration
    extraAllowedContent:
      - i(*)[*]
      - span(*)[*]
      - em(*)[*]

  # Mandatory for font awesome integration
  externalPlugins:
    ckeditor_fa5:
      resource: "EXT:energize/Resources/Public/JavaScript/Plugins/ckeditor_fa5/plugin.js?v=9.3.0"
    # Mandatory for font awesome integration
  coreStyles_italic:
    element: 'i'
    overrides: 'span'

  # Mandatory for font awesome integration
  extraAllowedContent:
    - i(*)[*]
    - span(*)[*]
    - em(*)[*]
  table:
    defaultHeadings: { rows: 1 }
    contentToolbar:
      - tableColumn
      - tableRow
      - mergeTableCells
      - tableProperties
      - tableCellProperties
      - toggleTableCaption
# available buttons for link handler
classes:
  link:
    name: Link
  btn btn-primary:
    name: "Button"

# button configuration for the different link types in link handler
buttons:
  link:
    relAttribute:
      enabled: true
    properties:
      class:
        allowedClasses: 'btn btn-primary,link'
    page:
      properties:
        class:
          default: ''
    file:
      properties:
        class:
          default: ''
        target:
          default: '_blank'
    folder:
      properties:
        class:
          default: ''
    url:
      properties:
        class:
          default: ''
        target:
          default: '_blank'
    mail:
      properties:
        class:
          default: ''
