TagParseRule
Parse rule targeting a DOM element.
§Extends
§Properties
For rules that produce non-leaf nodes, by default the content of the DOM element is parsed as content of the node. If the child nodes are in a descendent node, this may be a CSS selector string that the parser must use to find the actual content element, or a function that returns the actual content element to the parser.
A function used to compute the attributes for the node or mark
created by this rule. Can also be used to describe further
conditions the DOM element or style must match. When it returns
false
, the rule won't match. When it returns null or undefined,
that is interpreted as an empty/default set of attributes.
The namespace to match. Nodes are only matched when the namespace matches or this property is null.
Controls whether whitespace should be preserved when parsing the
content inside the matched element. false
means whitespace may
be collapsed, true
means that whitespace should be preserved
but newlines normalized to spaces, and "full"
means that
newlines should also be preserved.