Module: Prawn::Markup::Processor::Images
- Included in:
- Prawn::Markup::Processor
- Defined in:
- lib/prawn/markup/processor/images.rb
Constant Summary collapse
- ALLOWED_IMAGE_TYPES =
%w[image/png image/jpeg].freeze
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.prepended(base) ⇒ Object
8 9 10 |
# File 'lib/prawn/markup/processor/images.rb', line 8 def self.prepended(base) base.known_elements.push('img', 'iframe') end |
Instance Method Details
#start_iframe ⇒ Object
17 18 19 20 |
# File 'lib/prawn/markup/processor/images.rb', line 17 def start_iframe placeholder = iframe_placeholder append_text("\n#{placeholder}\n") if placeholder end |
#start_img ⇒ Object
12 13 14 15 |
# File 'lib/prawn/markup/processor/images.rb', line 12 def start_img add_current_text add_image_or_placeholder(current_attrs['src']) end |