Sha256: d99e500a741d74dba049f2e5fa3247b11d336e955fce4244e80b7732574c634c
Contents?: true
Size: 391 Bytes
Versions: 1
Compression:
Stored size: 391 Bytes
Contents
module ProsemirrorToHtml module Nodes class Heading < Node @node_type = 'heading' def tag [ { tag: "h#{@node.attrs.level}", attrs: tag_attrs } ] end private def tag_attrs attrs_hash = @node.attrs.to_h attrs_hash.slice(*attrs_hash.keys - %i[level]) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
prosemirror_to_html-0.2.0 | lib/prosemirror_to_html/nodes/heading.rb |