Sha256: 991b10a07d584f3fd46d7eb6f364e51466e3d61129ebd41818b838d776fd77bf

Contents?: true

Size: 1.18 KB

Versions: 11

Compression:

Stored size: 1.18 KB

Contents

# frozen_string_literal: true

require "active_support/configurable"

module Katalyst
  module Content
    class Config
      include ActiveSupport::Configurable

      config_accessor(:backgrounds) { %w[light dark] }
      config_accessor(:heading_styles) { %w[none default] }
      config_accessor(:items) do
        %w[
          Katalyst::Content::Content
          Katalyst::Content::Figure
          Katalyst::Content::Table
          Katalyst::Content::Section
          Katalyst::Content::Group
          Katalyst::Content::Column
          Katalyst::Content::Aside
        ]
      end
      config_accessor(:image_mime_types) { %w[image/png image/gif image/jpeg image/webp] }
      config_accessor(:max_image_size) { 20 }

      # Components
      config_accessor(:errors_component) { "Katalyst::Content::Editor::ErrorsComponent" }

      config_accessor(:base_controller) { "ApplicationController" }

      # Sanitizer
      config_accessor(:table_sanitizer_allowed_tags) do
        %w[table thead tbody tr th td caption a strong em span br p text].freeze
      end
      config_accessor(:table_sanitizer_allowed_attributes) do
        %w[colspan rowspan href].freeze
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
katalyst-content-2.7.0 lib/katalyst/content/config.rb
katalyst-content-2.6.2 lib/katalyst/content/config.rb
katalyst-content-2.6.1 lib/katalyst/content/config.rb
katalyst-content-2.6.0 lib/katalyst/content/config.rb
katalyst-content-2.5.1 lib/katalyst/content/config.rb
katalyst-content-2.5.0 lib/katalyst/content/config.rb
katalyst-content-2.4.2 lib/katalyst/content/config.rb
katalyst-content-2.4.1 lib/katalyst/content/config.rb
katalyst-content-2.3.2 lib/katalyst/content/config.rb
katalyst-content-2.3.1 lib/katalyst/content/config.rb
katalyst-content-2.3.0 lib/katalyst/content/config.rb