SchemaSpec
An object describing a schema, as passed to the Schema
constructor.
interface SchemaSpec <Nodes extends string = any, Marks extends string = any> {
marks?: [name in Marks]: MarkSpec | OrderedMap<MarkSpec>;
nodes: [name in Nodes]: NodeSpec | OrderedMap<NodeSpec>;
topNode?: string;
}§Properties
§
marks?: [name in Marks]: MarkSpec | OrderedMap<MarkSpec>
[src]The mark types that exist in this schema. The order in which they are provided determines the order in which mark sets are sorted and in which parse rules are tried.
§
nodes: [name in Nodes]: NodeSpec | OrderedMap<NodeSpec>
[src]The node types in this schema. Maps names to
NodeSpec
objects that describe the node type
associated with that name. Their order is significant—it
determines which parse rules take
precedence by default, and which nodes come first in a given
group.