Skip to content

Type Editor


Type Editor / @type-editor/model / types/content-parser/ContentMatch

types/content-parser/ContentMatch

Interfaces

InterfaceDescription

ContentMatch

MatchEdge

Represents an edge in the content match finite automaton. Each edge connects a node type to the next match state.

In the content matching system, edges define valid transitions between states. For example, if a paragraph can contain text, there would be an edge from the paragraph's content match to another state with the text node type.

Example

typescript
// An edge might represent: "paragraph node" -> "next state after paragraph"
const edge: MatchEdge = {
  type: schema.nodes.paragraph,
  next: someContentMatch,
};