2.0 Markup object

Represents an individual markup operation to applied to a text string.

Each markup element defines the formatting of a single section of the text. Markup elements can not overlap, and can not be nested.

See also the section on text formatting in the drill editor.

Example

{
  "type": "subscript",
  "offset": 26,
  "length": 1
}

Fields

Field Type Description
type
required
String The type of the markup defines the appearance of the referenced text. Supported values are:

  • italic
  • bold
  • bullet
  • underline
  • superscript
  • subscript
  • linebreak
  • placeholder
For the purpose of marking up incorrect answers to open ended questions, the following additional markup may be used:

  • strikethrough
  • spacer
offset
required
Integer The relative start position of the markup section in the source text, measured from the previous markup element, or the start of the source text if this is the first element.
length
required
Integer The length of the markup section.