Class: RichPickerInput

Inherits:
Formtastic::Inputs::StringInput
  • Object
show all
Includes:
Formtastic::Helpers::InputHelper
Defined in:
app/inputs/rich_picker_input.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#editor_optionsObject (readonly)

Returns the value of attribute editor_options.



5
6
7
# File 'app/inputs/rich_picker_input.rb', line 5

def editor_options
  @editor_options
end

Instance Method Details

#to_htmlObject



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'app/inputs/rich_picker_input.rb', line 7

def to_html
  @editor_options = Rich.options(options[:config], object_name, object.id)

  local_input_options = {
    :class => 'rich-picker',
    :style => editor_options[:style]
  }

  input_wrapping do
    label_html <<
    input_field(local_input_options) <<
    button <<
    preview <<
    javascript

  end
end