Element definitions

Each key under schema maps an XML element name to an editor node or mark. This page documents every property an entry may carry, then lists the catalogs from both built-in schemas.

Anatomy of an entry

"div": {
  "type": "block",                        // required — see Node types
  "content": "heading* (block | table)*", // allowed children (ProseMirror content expr)
  "defining": true,                       // node defines its content boundary
  "selectable": true,                     // can be selected as a whole
  "group": "block",                       // content-model group it belongs to
  "attributes": { "type": { "type": "string" }, "n": { "type": "string" } },
  "keyboard": { "Mod-Shift-e": { "command": "wrapDiv" } },
  "toolbar": { "Division": { "command": "wrapDiv", "select": "Blocks", "label": "…" } },
  "inputRules": [ { "find": "^>>", "type": "wrapping" } ]
}

Common properties

Property Applies to Meaning
type all The node type. Required. See Node types.
attributes all The element's attributes and their value definitions. See Attributes.
content block, list, listItem A ProseMirror content expression for the allowed children.
group block Content-model group the node belongs to (default block). Referenced by other elements' content.
defining block Marks the node as defining its content (affects paste/replace behaviour).
selectable block Whether the whole node can be selected.
gapCursor block Always offer a gap cursor next to the node, so the text can be continued after it even when it is the last child of its parent (set on figure/fig).
isolating, priority, inline block Passed through to the ProseMirror node spec.
tagName listItem, synthesized Emit a different XML tag than the entry key.
keyboard all Keyboard shortcuts that create/toggle the element. See Keyboard & input rules.
toolbar all Toolbar buttons that create/toggle the element. See Toolbar & selects.
inputRules block Markdown-style typing rules. See Keyboard & input rules.
when conditional entries Attribute conditions for dispatching one tag to different types. See Conditional types.

Content expressions

The content property is a ProseMirror content expression naming the groups/nodes a block may contain. For example div allows optional headings followed by blocks or tables:

"content": "heading* (block | table)*"

Elements declare which group they join via group (blocks default to block), and inline elements contribute to the implicit inline content of text blocks.

Element catalogs

TEI — src/tei-schema.json

Default when format is omitted or set to tei. 41 elements.

Element Type Content Attributes Flags
abbr inline — — T
anchor anchor — type T
cell cell — role

choice inline abbr expan — T
closer block block* — S T
date inline — when, not-before, not-after, from, to T
dateline block inline* — T
div block heading* (block | table) type, n D S T
expan inline — — T
figDesc block inline —

figure block (graphic|figDesc|head)* — S
footnote-reference inline — n

gap empty — unit, quantity T
gloss inline — target

graphic graphic — url 🔌 T
head block inline* type, n T
hi inline — rend T
item listItem — — S
lb empty — n T
list list heading* item+ rend S T
listAnnotation list note* — D
measure inline — quantity, unit T
note block p+ target, n, _reference S
opener block block* — S T
orgName inline — key 🔌 T
p block — — T
pb empty — n T
persName inline — key 🔌 T
placeName inline — key 🔌 T
quote block block* —

ref ref — target T
row row — —

rs inline — corresp, type

salute block inline* — T
signed block inline* — T
supplied inline — reason T
table table — —

term inline — key 🔌 T
title inline — level T
unclear inline — rend T
underline inline — —

JATS — src/jats-schema.json

Used when format="jats". 18 elements.

Element Type Content Attributes Flags
bold inline — — T
caption block p+ —

cell cell — colspan, rowspan

ext-link ref — xlink:href T
fig block (graphic|caption) — S
fn block p+ id, _reference S
fnGroup list fn — D
graphic graphic — xlink:href 🔌 T
italic inline — — T
item listItem — — S
list list item+ list-type S T
named-content inline — specific-use, content-type T
p block — — T
row row — —

sec block title? (block | table)* sec-type, id D S T
table table — —

title block inline* id T
xref anchor / inline — rid, ref-type, type C T

DocBook — src/docbook-schema.json

Used when format="docbook". 41 elements.

Element Type Content Attributes Flags
cell cell — —

code inline — — T
command inline — —

emphasis inline — role T
envar inline — —

epigraph block block+ — S
figure block (title|imagedata) — S
filename inline — — T
footnote block para+ id, _reference S
footnoteref anchor — linkend T
footnotes list footnote — D
function inline — —

guibutton inline — —

guilabel inline — —

guimenuitem inline — —

imagedata graphic — fileref, width 🔌 T
important block title? (block | table)+ — S
itemizedlist list listitem+ — S T
link ref — xlink:href, linkend, xlink:show T
listitem listItem (block | table)+ — S
note block title? (block | table)+ — S T
option inline — —

orderedlist list listitem+ — S T
para block — — T
parameter inline — —

procedure block step+ — S T
productname inline — —

programlisting block inline* language T
quote inline — —

row row — —

section block title? subtitle? (block | table) id D S T
step block title? (block | table)+ — S
subtitle block inline —

synopsis block inline* language

table table — —

tag inline — —

term block inline* —

title block inline* id T
variablelist block varlistentry+ — S T
varlistentry block term listitem — S
varname inline — —

Flags: D = defining, S = selectable, C = conditional, T = has a toolbar button, 🔌 = has an authority connector.