Sha256: 395c56fdf31190db0c67b2ee3d08624958113e5e6d4bc685c016a4082caa0e22

Contents?: true

Size: 735 Bytes

Versions: 45

Compression:

Stored size: 735 Bytes

Contents

require 'simple_form'

module Ckeditor::Hooks::SimpleForm
  class CkeditorInput < ::SimpleForm::Inputs::Base
    def input
      @builder.cktext_area(attribute_name, input_html_options)
    end
  end
end

::SimpleForm::FormBuilder.map_type :ckeditor, :to => Ckeditor::Hooks::SimpleForm::CkeditorInput

# TODO: remove this after a while, SimpleForm::FormBuilder#ckeditor is deprecated.
class SimpleForm::FormBuilder
  def ckeditor(attribute_name, options={}, &block)
    warn "[DEPRECATION] calling f.ckeditor(:#{attribute_name}, ...) is deprecated, call f.input(:#{attribute_name}, :as => :ckeditor, #{options.to_s[1..-1]}) #{Kernel.caller.first}"
    options[:as] = :ckeditor
    self.input(attribute_name, options, &block)
  end
end

Version data entries

45 entries across 45 versions & 3 rubygems

Version Path
glebtv-ckeditor-4.4.7.4 lib/ckeditor/hooks/simple_form.rb
glebtv-ckeditor-4.4.7.3 lib/ckeditor/hooks/simple_form.rb
glebtv-ckeditor-4.4.7.2 lib/ckeditor/hooks/simple_form.rb
glebtv-ckeditor-4.4.7.1 lib/ckeditor/hooks/simple_form.rb
glebtv-ckeditor-4.4.7 lib/ckeditor/hooks/simple_form.rb
glebtv-ckeditor-4.4.6 lib/ckeditor/hooks/simple_form.rb
glebtv-ckeditor-4.4.3.4 lib/ckeditor/hooks/simple_form.rb
glebtv-ckeditor-4.4.3.3 lib/ckeditor/hooks/simple_form.rb
glebtv-ckeditor-4.4.3.2 lib/ckeditor/hooks/simple_form.rb
glebtv-ckeditor-4.4.3.1 lib/ckeditor/hooks/simple_form.rb
glebtv-ckeditor-4.4.3.0 lib/ckeditor/hooks/simple_form.rb
glebtv-ckeditor-4.3.2.6 lib/ckeditor/hooks/simple_form.rb
glebtv-ckeditor-4.3.2.5 lib/ckeditor/hooks/simple_form.rb
ckeditor-4.0.11 lib/ckeditor/hooks/simple_form.rb
glebtv-ckeditor-4.3.2.4 lib/ckeditor/hooks/simple_form.rb
glebtv-ckeditor-4.3.2.3 lib/ckeditor/hooks/simple_form.rb
glebtv-ckeditor-4.3.2.2 lib/ckeditor/hooks/simple_form.rb
glebtv-ckeditor-4.3.2.1 lib/ckeditor/hooks/simple_form.rb
glebtv-ckeditor-4.3.2.0 lib/ckeditor/hooks/simple_form.rb
ckeditor-4.0.10 lib/ckeditor/hooks/simple_form.rb