NodeType
Node types are objects allocated once per Schema
and used to
tag Node
instances. They contain information
about the node type, such as its name and what kind of node it
represents.
§Properties
The starting match of the node type's content expression.
True if this is a textblock type, a block that contains inline content.
True when this node is an atom, i.e. when it does not have directly editable content.
The node type's whitespace option.
§Methods
Create a Node
of this type. The given attributes are
checked and defaulted (you can pass null
to use the type's
defaults entirely, if no required attributes exist). content
may be a Fragment
, a node, an array of nodes, or
null
. Similarly marks
may be null
to default to the empty
set of marks.
Like create
, but see if it is
necessary to add nodes to the start or end of the given fragment
to make it fit the node. If no fitting wrapping can be found,
return null. Note that, due to the fact that required nodes can
always be created, this will always succeed if you pass null or
Fragment.empty
as content.