Class: Formtastic::Inputs::AceEditorInput

Inherits:
TextInput
  • Object
show all
Defined in:
lib/formtastic/inputs/ace_editor_input.rb

Instance Method Summary collapse

Instance Method Details

#editor_optionsObject



20
21
22
23
24
# File 'lib/formtastic/inputs/ace_editor_input.rb', line 20

def editor_options
  return {id: input_html_options[:id] + "_editor",
          class: "ace-editor-container",
          style: "height: 350px; width: 75%"}
end

#to_htmlObject



6
7
8
9
10
11
12
13
14
# File 'lib/formtastic/inputs/ace_editor_input.rb', line 6

def to_html
  input_wrapping do
    label_html <<
    template.(:div, input_html_options.merge(editor_options)) do
      object.send(method).try :html_safe
    end <<
    builder.hidden_field(input_name)
  end
end

#wrapper_html_optionsObject



16
17
18
# File 'lib/formtastic/inputs/ace_editor_input.rb', line 16

def wrapper_html_options
  super.merge(:class => "flexible-text-area")
end