Sha256: 4512c1dca508bfaa9c3da9b94b40100da92fd0257399568eeea0909ec27ea25d
Contents?: true
Size: 620 Bytes
Versions: 10
Compression:
Stored size: 620 Bytes
Contents
# 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: nil, 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
10 entries across 10 versions & 1 rubygems