Sha256: fcd2d84488f9b587d509cacb04cad8f8026ae15a971ab166abcd720e31170f3a

Contents?: true

Size: 661 Bytes

Versions: 17

Compression:

Stored size: 661 Bytes

Contents

# frozen_string_literal: true

# Tag for text content that is going to be rendered using Redactor (default) in
# the admin area
#   {{ cms:wysiwyg identifier }}
#
#
class ComfortableMexicanSofa::Content::Tag::Wysiwyg < ComfortableMexicanSofa::Content::Tag::Fragment

  def form_field(object_name, view, index)
    name    = "#{object_name}[fragments_attributes][#{index}][content]"
    options = { id: form_field_id, data: { "cms-rich-text" => true } }
    input   = view.send(:text_area_tag, name, content, options)
    yield input
  end

end

ComfortableMexicanSofa::Content::Renderer.register_tag(
  :wysiwyg, ComfortableMexicanSofa::Content::Tag::Wysiwyg
)

Version data entries

17 entries across 17 versions & 6 rubygems

Version Path
comfortable_mexican_sofa-2.0.19 lib/comfortable_mexican_sofa/content/tags/wysiwyg.rb
PixelForce_ETS-0.0.2 lib/comfortable_mexican_sofa/content/tags/wysiwyg.rb
PixelForce_ETS-0.0.1 lib/comfortable_mexican_sofa/content/tags/wysiwyg.rb
kcyEtsTest2-0.0.4 lib/comfortable_mexican_sofa/content/tags/wysiwyg.rb
kcyEtsTest2-0.0.3 lib/comfortable_mexican_sofa/content/tags/wysiwyg.rb
kcyEtsTest2-0.0.2 lib/comfortable_mexican_sofa/content/tags/wysiwyg.rb
kcyEtsTest2-0.0.1 lib/comfortable_mexican_sofa/content/tags/wysiwyg.rb
kcyEtsTest-0.0.1 lib/comfortable_mexican_sofa/content/tags/wysiwyg.rb
kcyEtsTest-2.2.19 lib/comfortable_mexican_sofa/content/tags/wysiwyg.rb
ComfortableMexicanSofa-2.0.18 lib/comfortable_mexican_sofa/content/tags/wysiwyg.rb
kcy1-1.0 lib/comfortable_mexican_sofa/content/tags/wysiwyg.rb
comfortable_mexican_sofa-2.0.18 lib/comfortable_mexican_sofa/content/tags/wysiwyg.rb
comfortable_mexican_sofa-2.0.17 lib/comfortable_mexican_sofa/content/tags/wysiwyg.rb
comfortable_mexican_sofa-2.0.16 lib/comfortable_mexican_sofa/content/tags/wysiwyg.rb
comfortable_mexican_sofa-2.0.15 lib/comfortable_mexican_sofa/content/tags/wysiwyg.rb
comfortable_mexican_sofa-2.0.14 lib/comfortable_mexican_sofa/content/tags/wysiwyg.rb
comfortable_mexican_sofa-2.0.13 lib/comfortable_mexican_sofa/content/tags/wysiwyg.rb