Sha256: 7e452be91a0ad72e5edc1b90a6efb1089be182cc57a5c6af96c126e3a5aa9ff4

Contents?: true

Size: 312 Bytes

Versions: 3

Compression:

Stored size: 312 Bytes

Contents

module Panda
  module CMS
    module EditorJs
      module Blocks
        class Header < Base
          def render
            content = sanitize(data["text"])
            level = data["level"] || 2
            html_safe("<h#{level}>#{content}</h#{level}>")
          end
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
panda-cms-0.7.3 lib/panda/cms/editor_js/blocks/header.rb
panda-cms-0.7.2 lib/panda/cms/editor_js/blocks/header.rb
panda-cms-0.7.0 lib/panda/cms/editor_js/blocks/header.rb