Class: Katalyst::Content::Config
- Inherits:
-
Object
- Object
- Katalyst::Content::Config
- Defined in:
- lib/katalyst/content/config.rb
Instance Attribute Summary collapse
-
#base_controller ⇒ Object
Returns the value of attribute base_controller.
-
#default_theme ⇒ Object
Returns the value of attribute default_theme.
-
#errors_component ⇒ Object
Returns the value of attribute errors_component.
-
#heading_styles ⇒ Object
Returns the value of attribute heading_styles.
-
#image_mime_types ⇒ Object
Returns the value of attribute image_mime_types.
-
#items ⇒ Object
Returns the value of attribute items.
-
#max_image_size ⇒ Object
Returns the value of attribute max_image_size.
-
#table_sanitizer_allowed_attributes ⇒ Object
Returns the value of attribute table_sanitizer_allowed_attributes.
-
#table_sanitizer_allowed_tags ⇒ Object
Returns the value of attribute table_sanitizer_allowed_tags.
-
#themes ⇒ Object
Returns the value of attribute themes.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
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. = %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_controller ⇒ Object
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_theme ⇒ Object
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_component ⇒ Object
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_styles ⇒ Object
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_types ⇒ Object
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 |
#items ⇒ Object
Returns the value of attribute items.
6 7 8 |
# File 'lib/katalyst/content/config.rb', line 6 def items @items end |
#max_image_size ⇒ Object
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_attributes ⇒ Object
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_tags ⇒ Object
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 end |
#themes ⇒ Object
Returns the value of attribute themes.
6 7 8 |
# File 'lib/katalyst/content/config.rb', line 6 def themes @themes end |