class ComfortableMexicanSofa::Content::Tag::Wysiwyg

Tag for text content that is going to be rendered using Redactor (default) in the admin area

{{ cms:wysiwyg identifier }}

Public Instance Methods

form_field(object_name, view, index) { |input| ... } click to toggle source
# 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]"
  options = { id: form_field_id, data: { "cms-rich-text" => true } }
  input   = view.send(:text_area_tag, name, content, options)
  yield input
end