Node types
Every element entry has a type that decides which editor construct it becomes. The
dispatch happens in
src/extensions/extensions.js.
The types
type |
Becomes | Typical use |
|---|---|---|
inline |
a mark | phrase-level markup wrapping text: hi, rs, foreign, persName |
block |
a block node | paragraphs, divisions, headings, quotes |
empty |
a self-closing (atom) node | milestones with no content: pb, lb, milestone |
ref |
an inline reference node | ref/link-like elements |
anchor |
an anchor node | footnote anchors (paired with note) |
note |
a note node | footnote/annotation bodies (via a group) |
list |
a list node | list containers |
listItem |
a list item node | item — supports a custom tagName |
table / row / cell |
table nodes | table, row, cell |
graphic |
a graphic/figure node | images |
Marks vs. nodes
The most important distinction:
inline→ mark. Marks wrap runs of text and can overlap. Useinlinefor anything that decorates or annotates text without being a container.- everything else → node. Nodes are structural.
blocknodes hold other blocks or inline content (viacontent);emptynodes hold nothing; list/table nodes have fixed child structures.
Block details
block entries pass several optional properties straight through to the node:
group (default block), content, defining, selectable, isolating,
priority, inline. See Element definitions for what each means.
Elements per type
Counts below are from the built-in schemas. The same type values apply to any custom
schema.
TEI (src/tei-schema.json)
anchor— 1 element(s)block— 12 element(s)cell— 1 element(s)empty— 3 element(s)graphic— 1 element(s)inline— 17 element(s)list— 2 element(s)listItem— 1 element(s)ref— 1 element(s)row— 1 element(s)table— 1 element(s)
41 elements total.
JATS (src/jats-schema.json)
anchor— 1 element(s)block— 6 element(s)cell— 1 element(s)graphic— 1 element(s)inline— 4 element(s)list— 2 element(s)listItem— 1 element(s)ref— 1 element(s)row— 1 element(s)table— 1 element(s)