Order Interaction
Order interactions ask candidates to place a list of items into the correct sequence.
Install
pnpm add @citolab/prose-qtiThe order interaction is exposed as a subpath export from @citolab/prose-qti, so you import it from @citolab/prose-qti/components/order and register the custom elements with @citolab/prose-qti/components/order/register.
Usage
Use the register side effect once, then call the insert command from your editor integration:
import '@citolab/prose-qti/components/order/register';import { insertOrderInteraction } from '@citolab/prose-qti/components/order';
insertOrderInteraction(view.state, view.dispatch, view);This package integrates with @qti-components/order-interaction.
What it does
- Inserts a
qti-order-interactionwith editable ordered choices. - Supports authoring ordering tasks while preserving their QTI-specific structure.
- Keeps sequence semantics in the editor model instead of leaving ordering as presentation-only content.