Sha256: 545f2599dec88f4697e15d21ee113646e8e5bee9a9b2bedad9c6dc3546e0580b

Contents?: true

Size: 779 Bytes

Versions: 20

Compression:

Stored size: 779 Bytes

Contents

module Locomotive
  module Liquid
    module Tags
      module Editable
        class LongText < ShortText

          protected

          def render_element(context, element)
            content = element.default_content? ? render_default_content(context) : element.content

            if editable?(context, element)
              %{
                <div class='editable-long-text' data-element-id='#{element.id}' data-element-index='#{element._index}'>
                  #{content}
                </div>
              }
            else
              content
            end
          end

          def document_type
            EditableLongText
          end

        end

        ::Liquid::Template.register_tag('editable_long_text', LongText)
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 2 rubygems

Version Path
locomotive_cms-2.1.4 lib/locomotive/liquid/tags/editable/long_text.rb
locomotive_cms-2.1.3 lib/locomotive/liquid/tags/editable/long_text.rb
locomotive_cms-2.1.2 lib/locomotive/liquid/tags/editable/long_text.rb
locomotive_cms-2.1.1 lib/locomotive/liquid/tags/editable/long_text.rb
locomotive_cms-2.1.0 lib/locomotive/liquid/tags/editable/long_text.rb
locomotive_cms-2.0.3 lib/locomotive/liquid/tags/editable/long_text.rb
locomotive_cms-2.0.2 lib/locomotive/liquid/tags/editable/long_text.rb
locomotive_cms-2.0.1 lib/locomotive/liquid/tags/editable/long_text.rb
locomotive_cms-2.0.0 lib/locomotive/liquid/tags/editable/long_text.rb
tribeca_cms-0.1.1 lib/locomotive/liquid/tags/editable/long_text.rb
tribeca_cms-2.0.0.rc12 lib/locomotive/liquid/tags/editable/long_text.rb
locomotive_cms-2.0.0.rc12 lib/locomotive/liquid/tags/editable/long_text.rb
locomotive_cms-2.0.0.rc11 lib/locomotive/liquid/tags/editable/long_text.rb
locomotive_cms-2.0.0.rc10 lib/locomotive/liquid/tags/editable/long_text.rb
locomotive_cms-2.0.0.rc9 lib/locomotive/liquid/tags/editable/long_text.rb
locomotive_cms-2.0.0.rc8 lib/locomotive/liquid/tags/editable/long_text.rb
locomotive_cms-2.0.0.rc7 lib/locomotive/liquid/tags/editable/long_text.rb
locomotive_cms-2.0.0.rc6 lib/locomotive/liquid/tags/editable/long_text.rb
locomotive_cms-2.0.0.rc5 lib/locomotive/liquid/tags/editable/long_text.rb
locomotive_cms-2.0.0.rc4 lib/locomotive/liquid/tags/editable/long_text.rb