Sha256: 6e999e055cc410537f6e4bf8af7caccefd4f3f42811984904e1282b3247210ae
Contents?: true
Size: 595 Bytes
Versions: 10
Compression:
Stored size: 595 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 Occams::Content::Tag::Wysiwyg < Occams::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 Occams::Content::Renderer.register_tag( :wysiwyg, Occams::Content::Tag::Wysiwyg )
Version data entries
10 entries across 10 versions & 1 rubygems