Sha256: 43aeac008ef3090254c11009d38f7add99d1557d2182310ebd2f88023d042268

Contents?: true

Size: 550 Bytes

Versions: 12

Compression:

Stored size: 550 Bytes

Contents

if (Object.const_defined?("Formtastic") && Gem.loaded_specs["formtastic"].version.version[0,1] == "2")

  class RichInput < ::Formtastic::Inputs::TextInput  
    def to_html

      scope_type = object_name
      scope_id = object.id
      editor_options = Rich.options(options[:config], scope_type, scope_id)

      input_wrapping do
        label_html <<
        builder.text_area(method, input_html_options) <<
        "<script>CKEDITOR.replace('#{dom_id}', #{editor_options.to_json.html_safe});</script>".html_safe  
      end
    end
  end

end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
st-rich-1.5.1 app/inputs/rich_input.rb
rich-1.4.6 app/inputs/rich_input.rb
rich-1.4.5 app/inputs/rich_input.rb
rich-1.4.4 app/inputs/rich_input.rb
rich-1.4.3 app/inputs/rich_input.rb
rich-1.4.2 app/inputs/rich_input.rb
rich-1.4.1 app/inputs/rich_input.rb
rich-1.4 app/inputs/rich_input.rb
rich-1.3.1 app/inputs/rich_input.rb
rich-1.3.0 app/inputs/rich_input.rb
rich-1.2.0 app/inputs/rich_input.rb
rich-1.1.0 app/inputs/rich_input.rb