Sha256: 71b4eb43e17d6f692e334713e09bdb6041bb689aea483a685e7d1f7f2ff6d4c8

Contents?: true

Size: 274 Bytes

Versions: 3

Compression:

Stored size: 274 Bytes

Contents

module PandaCms
  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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
panda_cms-0.6.3 app/lib/panda_cms/editor_js/blocks/header.rb
panda_cms-0.6.2 app/lib/panda_cms/editor_js/blocks/header.rb
panda_cms-0.6.1 app/lib/panda_cms/editor_js/blocks/header.rb