Sha256: f4995aa2770721f87ddbc70a6c1620d998394e2e2dfc0064a024edd39ef83358

Contents?: true

Size: 701 Bytes

Versions: 16

Compression:

Stored size: 701 Bytes

Contents

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

          protected

          def render_element(context, element)
            if context.registers[:inline_editor]
              %{
                <div class='editable-long-text' data-element-id='#{element.id}' data-element-index='#{element._index}'>
                  #{element.content}
                </div>
              }
            else
              element.content
            end
          end

          def document_type
            EditableLongText
          end

        end

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

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
locomotive_cms-2.0.0.rc2 lib/locomotive/liquid/tags/editable/long_text.rb
locomotive_cms-2.0.0.rc1 lib/locomotive/liquid/tags/editable/long_text.rb
locomotive_cms-1.0.0.beta.2 lib/locomotive/liquid/tags/editable/long_text.rb
locomotive_cms-1.0.0.beta lib/locomotive/liquid/tags/editable/long_text.rb
locomotive_cms-0.0.4.beta12 lib/locomotive/liquid/tags/editable/long_text.rb
locomotive_cms-0.0.4.beta11 lib/locomotive/liquid/tags/editable/long_text.rb
locomotive_cms-0.0.4.beta10 lib/locomotive/liquid/tags/editable/long_text.rb
locomotive_cms-0.0.4.beta9 lib/locomotive/liquid/tags/editable/long_text.rb
locomotive_cms-0.0.4.beta8 lib/locomotive/liquid/tags/editable/long_text.rb
locomotive_cms-0.0.4.beta7 lib/locomotive/liquid/tags/editable/long_text.rb
locomotive_cms-0.0.4.beta5 lib/locomotive/liquid/tags/editable/long_text.rb
locomotive_cms-0.0.4.beta4 lib/locomotive/liquid/tags/editable/long_text.rb
locomotive_cms-0.0.4.beta3 lib/locomotive/liquid/tags/editable/long_text.rb
locomotive_cms-0.0.4.beta2 lib/locomotive/liquid/tags/editable/long_text.rb
locomotive_cms-0.0.4.beta1 lib/locomotive/liquid/tags/editable/long_text.rb
locomotive_cms-0.0.4 lib/locomotive/liquid/tags/editable/long_text.rb