Sha256: 6d8c21b791d9b53177cc466089f2f046dab5c506ecbcc1518445105e2c366783

Contents?: true

Size: 845 Bytes

Versions: 6

Compression:

Stored size: 845 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 = (options || {}).stringify_keys
        ck_options = (options.delete('ckeditor') || {}).stringify_keys
        
        instance_tag = ActionView::Base::InstanceTag.new(object_name, method, self, options.delete('object'))
        instance_tag.send(:add_default_name_and_id, options) if options['id'].blank?
        
        output_buffer = ActiveSupport::SafeBuffer.new
        output_buffer << instance_tag.to_text_area_tag(options)
        output_buffer << javascript_tag(Utils.js_replace(options['id'], ck_options))
        output_buffer
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ckeditor-4.0.4 lib/ckeditor/helpers/form_helper.rb
ckeditor-4.0.2 lib/ckeditor/helpers/form_helper.rb
ckeditor-4.0.1 lib/ckeditor/helpers/form_helper.rb
ckeditor-4.0.0 lib/ckeditor/helpers/form_helper.rb
ckeditor-4.0.0.rc2 lib/ckeditor/helpers/form_helper.rb
ckeditor-4.0.0.rc1 lib/ckeditor/helpers/form_helper.rb