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