class HtmlToProsemirror::Nodes::ListItem
Public Class Methods
new(dom_node)
click to toggle source
Calls superclass method
# File lib/html_to_prosemirror/nodes/list_item.rb, line 4 def initialize(dom_node) super(dom_node) @wrapper = { type: 'paragraph' } end
Public Instance Methods
data()
click to toggle source
# File lib/html_to_prosemirror/nodes/list_item.rb, line 13 def data if(@node.children.length === 1 && @node.children[0].name === 'p') @wrapper = nil end { type: "list_item" } end
matching()
click to toggle source
# File lib/html_to_prosemirror/nodes/list_item.rb, line 9 def matching @node.name === 'li' end