Sha256: 0898079a154932548d447079193440245b8050af647eb6fec503c6bbdbac48b8
Contents?: true
Size: 845 Bytes
Versions: 12
Compression:
Stored size: 845 Bytes
Contents
module Ckeditor module Hooks module SimpleFormBuilder class CkeditorInput < ::SimpleForm::Inputs::Base def input @builder.send(:cktext_area, attribute_name, input_html_options) end end def self.included(base) base.send(:include, InstanceMethods) end module InstanceMethods def ckeditor(attribute_name, options={}, &block) column = find_attribute_column(attribute_name) input_type = default_input_type(attribute_name, column, options) if block_given? SimpleForm::Inputs::BlockInput.new(self, attribute_name, column, input_type, options, &block).render else CkeditorInput.new(self, attribute_name, column, input_type, options).render end end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems