Skip to content

Extended Text Interaction

Extended text interactions collect longer free-text responses in a multi-line response area.

Install

Terminal window
pnpm add @citolab/prose-qti

The extended text interaction is exposed as a subpath export from @citolab/prose-qti, so you import it from @citolab/prose-qti/components/extended-text and register the custom elements with @citolab/prose-qti/components/extended-text/register.

Usage

Use the register side effect once, then call the insert command from your editor integration:

import '@citolab/prose-qti/components/extended-text/register';
import { insertExtendedTextInteraction } from '@citolab/prose-qti/components/extended-text';
insertExtendedTextInteraction(view.state, view.dispatch, view);

This package integrates with @qti-components/extended-text-interaction.

What it does

  • Inserts a qti-extended-text-interaction block node.
  • Supports essay-style or paragraph-length responses.
  • Lets authors configure response-related attributes while keeping the interaction represented as valid QTI structure.

In the editor

Configure expected length and format via the attributes panel.