Integration Overview
QTI Editor is a composable authoring kit built on ProseMirror. It ships as a set of focused packages that add QTI interaction types, commands, and serialization on top of a standard ProseMirror instance. There is no proprietary editor core to embed — your application owns the DOM and lifecycle; the QTI packages slot in as descriptors, plugins, and node specs.
The canonical integration shape is qti-prosemirror-item, a minimal pure-ProseMirror QTI roundtrip editor. The TypeScript Integration guide walks through that shape file by file.
The layer model
| Layer | What it is | Required |
|---|---|---|
| ProseMirror | Document model, view, and transaction system | Yes |
@citolab/prose-qti | Descriptor registry, all QTI interactions, item roundtrip | Yes |
@citolab/prose-extensions | Generic ProseMirror extensions (block selection, node attrs sync, etc.) | Optional |
What you assemble
The boilerplate splits its editor across three files:
schema.ts— the document topology. Each interaction’sqti*InteractionNodeSpecis spread into one literalSchemawith explicitcontentandgrouprules.prosemirror-qti.ts— the QTI integration layer. Imports each*InteractionDescriptorexplicitly, derives theqtiPluginsarray andeditableAttrsallowlist from them, and exposes theimportItemFromUrl/exportItemXmlroundtrip helpers from@citolab/prose-qti/item-roundtrip.main.ts— the composition root.new EditorView(...)+EditorState.create({ doc, plugins }), withqtiPluginsordered before the list-split andkeymap(baseKeymap)so the QTI Enter/Backspace overrides win and unhandled keys fall through.
qti-components
QTI Editor depends on @qti-components/* for the underlying QTI web components that render and encapsulate interaction behavior at runtime. @citolab/prose-qti pulls in the required @qti-components dependencies automatically.
Guide
- TypeScript Integration — the boilerplate, file by file