Class: Katalyst::Content::Figure
- Defined in:
- app/models/katalyst/content/figure.rb
Constant Summary
Constants included from DuplicatesAttachments
DuplicatesAttachments::DUPLICATORS
Constants included from DuplicatesAssociations
DuplicatesAssociations::DUPLICATORS
Instance Attribute Summary
Attributes inherited from Item
#children, #depth, #index, #next_sibling, #parent, #previous_sibling
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Item
config, #dom_id, #heading_style_class, #item_type, #layout?, #show_heading?
Methods included from DuplicatesRichText
Methods included from DuplicatesAttachments
Methods included from DuplicatesAssociations
Class Method Details
.permitted_params ⇒ Object
15 16 17 |
# File 'app/models/katalyst/content/figure.rb', line 15 def self.permitted_params super - %i[heading_style] + %i[image caption] end |
Instance Method Details
#to_plain_text ⇒ Object
21 22 23 24 25 |
# File 'app/models/katalyst/content/figure.rb', line 21 def to_plain_text text = ["Image: #{alt}"] text << "Caption: #{caption}" if caption.present? text.compact.join("\n") if visible? end |