Class: TextareaTinymceInput

Inherits:
SimpleForm::Inputs::Base
  • Object
show all
Defined in:
app/inputs/textarea_tinymce_input.rb

Instance Method Summary collapse

Instance Method Details

#input(wrapper_options = nil) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'app/inputs/textarea_tinymce_input.rb', line 4

def input(wrapper_options = nil)
  out = ActiveSupport::SafeBuffer.new

   # prepare options
  new_html_options = prepare_html_options(wrapper_options)


  #input_html_classes.unshift(" currency")
  #input_html_options[:type] ||= input_type if html5?

  #template.content_tag(:span, "$", class: "add-on") +
  #@builder.text_field(attribute_name, input_html_options)

  out << @builder.text_area(attribute_name, new_html_options)
  out
end

#prepare_html_options(wrapper_options = nil) ⇒ Object



21
22
23
24
25
26
# File 'app/inputs/textarea_tinymce_input.rb', line 21

def prepare_html_options(wrapper_options=nil)
  new_options = {}
  new_options[:class] = [input_html_options[:class], options[:class], 'tinymce'].compact

  merge_wrapper_options(input_html_options.merge(new_options), wrapper_options)
end