Class: Katalyst::Content::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/katalyst/content/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/katalyst/content/config.rb', line 19

def initialize
  self.themes        = %w[light dark]
  self.default_theme = themes.first

  self.heading_styles   = %w[none default]
  self.items            = %w[
    Katalyst::Content::Content
    Katalyst::Content::Figure
    Katalyst::Content::Table
    Katalyst::Content::Section
    Katalyst::Content::Group
    Katalyst::Content::Column
    Katalyst::Content::Aside
  ]
  self.image_mime_types = %w[image/png image/gif image/jpeg image/webp]
  self.max_image_size   = 20
  self.errors_component = "Katalyst::Content::Editor::ErrorsComponent"

  self.base_controller = "ApplicationController"

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

Instance Attribute Details

#base_controllerObject

Returns the value of attribute base_controller.



6
7
8
# File 'lib/katalyst/content/config.rb', line 6

def base_controller
  @base_controller
end

#default_themeObject

Returns the value of attribute default_theme.



6
7
8
# File 'lib/katalyst/content/config.rb', line 6

def default_theme
  @default_theme
end

#errors_componentObject

Returns the value of attribute errors_component.



6
7
8
# File 'lib/katalyst/content/config.rb', line 6

def errors_component
  @errors_component
end

#heading_stylesObject

Returns the value of attribute heading_styles.



6
7
8
# File 'lib/katalyst/content/config.rb', line 6

def heading_styles
  @heading_styles
end

#image_mime_typesObject

Returns the value of attribute image_mime_types.



6
7
8
# File 'lib/katalyst/content/config.rb', line 6

def image_mime_types
  @image_mime_types
end

#itemsObject

Returns the value of attribute items.



6
7
8
# File 'lib/katalyst/content/config.rb', line 6

def items
  @items
end

#max_image_sizeObject

Returns the value of attribute max_image_size.



6
7
8
# File 'lib/katalyst/content/config.rb', line 6

def max_image_size
  @max_image_size
end

#table_sanitizer_allowed_attributesObject

Returns the value of attribute table_sanitizer_allowed_attributes.



6
7
8
# File 'lib/katalyst/content/config.rb', line 6

def table_sanitizer_allowed_attributes
  @table_sanitizer_allowed_attributes
end

#table_sanitizer_allowed_tagsObject

Returns the value of attribute table_sanitizer_allowed_tags.



6
7
8
# File 'lib/katalyst/content/config.rb', line 6

def table_sanitizer_allowed_tags
  @table_sanitizer_allowed_tags
end

#themesObject

Returns the value of attribute themes.



6
7
8
# File 'lib/katalyst/content/config.rb', line 6

def themes
  @themes
end