# Drag the Words (H5P.DragText)

Text with gaps the learner fills by dragging words from a list. Easier than typing them: recognition, not recall.

- `textField` is plain text with the words to drag marked `*word*`; a tip after `:`, feedback after `\+` (right) and `\-` (wrong), as the Fields section shows.
- Each gap has one right word. Line breaks in `textField` are kept.
- `distractors` adds wrong words to the list, in the same `*word*` form.

## Example

```json
{
  "type": "H5P.DragText",
  "params": {
    "taskDescription": "Drag each river to the city it flows through.",
    "textField": "Vienna lies on the *Danube*.\nLondon lies on the *Thames*.\nParis lies on the *Seine*.",
    "distractors": "*Rhine* *Volga*"
  }
}
```

<!-- Generated by `h5p-author schema --markdown` from the pinned pack. Do not edit by hand. -->

## Fields of H5P.DragText 1.10

The example is `type` and `params` alone, and `params` holds the fields below. A source also names its own `title`, `language`, `license` and `authors`, all four required: the build refuses a source that leaves out any of them. The author's name and the licence are the user's: ask for what they have not given. For a name they skip, write the one you know them by, or "Unknown"; for a licence they skip, `U`.

- `media` group — Media
  - `type` sub-content: H5P.Image | H5P.Video | H5P.Audio — Type: Optional media to display above the question.
  - `disableImageZooming` boolean = false; only when type is "H5P.Image 1.1" — Disable image zooming
- `taskDescription` html: strong em u a ul ol h2 h3 hr pre code = "Drag the words into the correct boxes" — Task description: Describe how the user should solve the task.
- `textField` text, multi-line, required — Text
  Droppable words are added with an asterisk (*) in front and behind the correct word/phrase. You may add a textual tip, using a colon (:) in front of the tip. For every empty spot there is only one correct word. You may add feedback to be displayed when a task is completed. Use '\+' for correct and '\-' for incorrect feedback. Example: H5P content may be edited using a *browser:What type of program is Chrome?*. H5P content is *interactive\+Correct! \-Incorrect, try again!*
- `distractors` text — Distractors: Enter extra solutions that are wrong as distractors. Use the same asterisk (*) scheme as for the text.
- `overallFeedback` list 1+ of — Overall Feedback: Click the "Add range" button to add as many ranges as you need. Example: 0-20% Bad score, 21-91% Average Score, 91-100% Great Score!
  - `from` whole number 0–100 = 0 — Score Range
  - `to` whole number 0–100 = 100
  - `feedback` text — Feedback for defined score range
- `behaviour` group — Behavioural settings.
  - `enableRetry` boolean = true — Enable "Retry"
  - `enableSolutionsButton` boolean = true — Enable "Show Solution" button
  - `instantFeedback` boolean = false — Instant feedback

21 interface texts are left out: they come from the libraries' translations. `h5p-author schema H5P.DragText --all` lists them, for a source to set one.

<!-- End of the generated section. -->
