Class: Wysihtml5Input
- Inherits:
-
SimpleForm::Inputs::TextInput
- Object
- SimpleForm::Inputs::TextInput
- Wysihtml5Input
- Defined in:
- lib/bootstrap-wysihtml5-rails/simple_form/wysihtml5_input.rb
Instance Method Summary collapse
Instance Method Details
#input(wrapper_options) ⇒ Object
2 3 4 5 6 7 8 9 |
# File 'lib/bootstrap-wysihtml5-rails/simple_form/wysihtml5_input.rb', line 2 def input() idf = "#{lookup_model_names.join("_")}_#{reflection_or_attribute_name}" script = template.content_tag(:script, type: 'text/javascript') do "$('textarea[id=#{idf}]').wysihtml5(#{[:wysihtml5].to_json});".html_safe end super + script end |