Class: AbAdmin::Views::Inputs::CkeditorInput

Inherits:
SimpleForm::Inputs::Base
  • Object
show all
Defined in:
lib/ab_admin/views/inputs/ckeditor_input.rb

Instance Method Summary collapse

Instance Method Details

#input(wrapper_options = nil) ⇒ Object


5
6
7
8
9
10
11
12
# File 'lib/ab_admin/views/inputs/ckeditor_input.rb', line 5

def input(wrapper_options=nil)
  unless @builder.template.instance_variable_get(:@ckeditor_init)
    @builder.template.concat @builder.template.javascript_include_tag('/javascripts/ckeditor/init')
    @builder.template.instance_variable_set(:@ckeditor_init, true)
  end
  input_html_options.reverse_merge!({width: 800, height: 200, toolbar: 'Easy'})
  @builder.cktext_area(attribute_name, input_html_options)
end