Sha256: e5cf5a6dabe56e9450f21584ab42b81761c68e34b5a6c1579c51dc3c1e0eea92

Contents?: true

Size: 1013 Bytes

Versions: 13

Compression:

Stored size: 1013 Bytes

Contents

module Ckeditor
  module Helpers
    module FormHelper
      extend ActiveSupport::Concern
      
      include ActionView::Helpers::TagHelper
      include ActionView::Helpers::JavaScriptHelper
      
      def cktext_area(object_name, method, options = {})
        options = { :language => I18n.locale.to_s }.merge(options)
        input_html = (options.delete(:input_html) || {}).stringify_keys
        js_content_for_section = options.delete(:js_content_for)
        
        instance_tag = ActionView::Base::InstanceTag.new(object_name, method, self, options.delete(:object))
        instance_tag.send(:add_default_name_and_id, input_html)
        
        output_buffer = ActiveSupport::SafeBuffer.new
        output_buffer << instance_tag.to_text_area_tag(input_html)
        
        js = Utils.js_replace(input_html['id'], options)
        
        output_buffer << (js_content_for_section ? content_for(js_content_for_section, js) : javascript_tag(js))
        output_buffer
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 3 rubygems

Version Path
glebtv-ckeditor-4.0.2.7 lib/ckeditor/helpers/form_helper.rb
glebtv-ckeditor-4.0.2.6 lib/ckeditor/helpers/form_helper.rb
glebtv-ckeditor-4.0.2.5 lib/ckeditor/helpers/form_helper.rb
glebtv-ckeditor-4.0.2.4 lib/ckeditor/helpers/form_helper.rb
glebtv-ckeditor-4.0.2.2 lib/ckeditor/helpers/form_helper.rb
glebtv-ckeditor-4.0.2.1 lib/ckeditor/helpers/form_helper.rb
glebtv-ckeditor-4.0.2 lib/ckeditor/helpers/form_helper.rb
glebtv-ckeditor-4.0.1 lib/ckeditor/helpers/form_helper.rb
lafeber_ckeditor-3.7.3 lib/ckeditor/helpers/form_helper.rb
ckeditor-3.7.3 lib/ckeditor/helpers/form_helper.rb
ckeditor-3.7.2 lib/ckeditor/helpers/form_helper.rb
ckeditor-3.7.1 lib/ckeditor/helpers/form_helper.rb
ckeditor-3.7.0 lib/ckeditor/helpers/form_helper.rb