Class: PagedownTextInput

Inherits:
Formtastic::Inputs::StringInput
  • Object
show all
Defined in:
app/inputs/pagedown_text_input.rb

Instance Method Summary collapse

Instance Method Details

#input_html_optionsObject



4
5
6
# File 'app/inputs/pagedown_text_input.rb', line 4

def input_html_options
  super.merge(:class => "wmd-input")
end

#to_htmlObject



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

def to_html
  input_wrapping do

    label_html <<

        template.(:div, :class => 'wmd-panel' ) do
          template.(:div, "", :class => 'wmd-button-bar') <<
              builder.text_area(method, input_html_options)
        end <<

        template.(:div, "", :style=> 'margin-top:20px' ) do
          template.(:label, "Preview" ) <<
              template.(:div, "", :class => "wmd-panel wmd-preview" )
        end
  end.html_safe
end