QTI Interactions
QTI Editor ships its interactions as focused packages. Each @qti-editor/interaction-* package adds the schema, commands, serialization, and editor wiring for one QTI interaction type.
These packages are closely coupled to our other open source library, qti-components. In practice, QTI Editor is responsible for authoring behavior and document structure, while qti-components supplies the underlying QTI web components that render and encapsulate the interaction behavior itself. That split keeps the integration framework agnostic while letting each interaction package stay small and explicit.
When you install an interaction package, its matching @qti-components/* dependency is pulled in automatically. You typically install only the interactions your product needs.
Available interactions
| Interaction | What it does | Package |
|---|---|---|
| Choice Interaction | Single- or multiple-choice questions with a prompt and selectable choices | @qti-editor/interaction-choice |
| Inline Choice Interaction | Dropdown choices embedded directly in a sentence | @qti-editor/interaction-inline-choice |
| Text Entry Interaction | Short free-text answers entered inline | @qti-editor/interaction-text-entry |
| Extended Text Interaction | Longer free-text answers in a multi-line response area | @qti-editor/interaction-extended-text |
| Match Interaction | Matching items across two sets | @qti-editor/interaction-match |
| Order Interaction | Ordering a list of choices into the correct sequence | @qti-editor/interaction-order |
| Select Point Interaction | Clicking a coordinate or hotspot on an image | @qti-editor/interaction-select-point |
Installing interactions
Install only the packages you need, for example:
pnpm add \ @qti-editor/interaction-choice \ @qti-editor/interaction-inline-choice \ @qti-editor/interaction-text-entryEach package exports ProseMirror commands and schema pieces that you register into your editor setup. The framework guides and framework guides show complete integration examples.