Class: Para::ModelFieldParsers::WysiwygEditor

Inherits:
Base
  • Object
show all
Defined in:
lib/para/model_field_parsers/wysiwyg_editor.rb

Instance Attribute Summary

Attributes inherited from Base

#fields_hash, #mappings, #model

Instance Method Summary collapse

Methods inherited from Base

#applicable?, #find_attributes_for_mapping, #initialize, register

Constructor Details

This class inherits a constructor from Para::ModelFieldParsers::Base

Instance Method Details

#parse!Object



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/para/model_field_parsers/wysiwyg_editor.rb', line 6

def parse!
  %w[content description].each do |field_name|
    field = fields_hash[field_name]

    next unless field && field.type == :text

    fields_hash[field_name] = Para::AttributeField::WysiwygEditor.new(
      field.model, name: field_name
    )
  end
end