Class: ComfortableMexicanSofa::Content::Tag::Wysiwyg
- Inherits:
-
Fragment
- Object
- ComfortableMexicanSofa::Content::Tag
- Fragment
- ComfortableMexicanSofa::Content::Tag::Wysiwyg
- Defined in:
- lib/comfortable_mexican_sofa/content/tags/wysiwyg.rb
Overview
Tag for text content that is going to be rendered using Redactor (default) in the admin area
{{ cms:wysiwyg identifier }}
Instance Attribute Summary
Attributes inherited from Fragment
#identifier, #namespace, #options, #renderable
Attributes inherited from ComfortableMexicanSofa::Content::Tag
Instance Method Summary collapse
Methods inherited from Fragment
#content, #form_field_id, #fragment, #initialize, #render
Methods inherited from ComfortableMexicanSofa::Content::Tag
#allow_erb?, #content, #initialize, #nodes, #render
Constructor Details
This class inherits a constructor from ComfortableMexicanSofa::Content::Tag::Fragment
Instance Method Details
#form_field(object_name, view, index) {|input| ... } ⇒ Object
10 11 12 13 14 15 |
# File 'lib/comfortable_mexican_sofa/content/tags/wysiwyg.rb', line 10 def form_field(object_name, view, index) name = "#{object_name}[fragments_attributes][#{index}][content]" = { id: form_field_id, data: { "cms-rich-text" => true } } input = view.send(:text_area_tag, name, content, ) yield input end |