2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
# File 'lib/simple_form_markdown_editor_bootstrap/markdown_input.rb', line 2
def input
suffix = input_options[:suffix]
input_id = "wmd-input#{suffix}"
preview_id = "wmd-preview#{suffix}"
button_bar_id = "wmd-button-bar#{suffix}"
input_html_options.merge!({id: input_id})
template.content_tag(:div, class: 'wmd-panel') do
template.content_tag(:div, '', id: button_bar_id) +
@builder.text_area(attribute_name, input_html_options)
end +
template.content_tag(:div, '', id: preview_id, class: 'wmd-preview')
end
|