Canonical format, version 1. The document file carries the same
format and
formatVersion envelope as every other file in the course, alongside the Tiptap doc
node. Ignore those two keys when handing the document to a ProseMirror renderer.tiptap part is a standard Tiptap / ProseMirror JSON document: a
root doc node with a content array of nodes. Renderers can use Tiptap’s own
generateHTML, or walk the JSON directly.
Standard nodes
Documents use Tiptap StarterKit plus a few extensions. Expect these node and mark types:- StarterKit:
doc,paragraph,text,heading,bulletList,orderedList,listItem,blockquote,codeBlock,horizontalRule,hardBreak, and the marksbold,italic,strike,code. - Extensions:
highlight(mark),textStyle(mark),table/tableRow/tableHeader/tableCell, andyoutube.
Custom nodes
Three custom nodes connect a document to reusable content and media. A learner or creator app must handle these; a generic Tiptap renderer will not.contentRecord
Inline atom node that embeds a reusable record via a binding. Resolve the binding and render according topresentation.
audio and video
Block atom nodes for media. They can carry a resolvedsrc or reference an asset by
assetId (resolve assetId to the asset’s file when present).
image
The image node is Tiptap’simage extended with an assetId attribute, so an image can
point at a project asset instead of an external URL. Prefer assetId when present and
resolve it to the asset’s file.
Rendering checklist
- Render standard nodes and marks with Tiptap or your own walker.
- For
contentRecord, resolveattrs.bindingwith the binding resolver and render bypresentation. - For
audio,video, andimage, resolveassetIdto the asset file and render the player. - Handle a
missingresolution gracefully (see Resolving and rendering); a broken reference should not crash the page.