Contents

ListItemStyle

The object for defining the style for bulleted or numbered lists in an article.

Declaration

object ListItemStyle

Properties

NameTypeDescription
type Requiredstring

The type of list item indicator to use.

Allowed options are:

  • bullet: Prepends a bullet before each list item. This is the default for unordered lists.

  • decimal: Prepends each list item with an incremental number. This is the default for ordered lists.

  • lower_alphabetical: Prepends list items with a lowercase letter.

  • upper_alphabetical: Prepends list items with an uppercase letter.

  • lower_roman: Prepends list items with a lowercase Roman numeral.

  • upper_roman: Prepends list items with an uppercase Roman numeral.

  • character: Prepends list items with a custom character. Use the character property to specify a character.

  • none: Doesn’t prepend any indicator for list items. Indenting is still in effect.

characterstring

If type is set to character, provide the character to use as the list item indicator. Only a single character is supported.

Discussion

Use the ListItemStyle object to define text formatting for a bulleted (unordered) or numbered (ordered) list. Put listItemStyle inside a TextStyle object or ComponentTextStyle object and set the text component’s format property to html. See Using HTML with Apple News Format.

You can use this object in TextStyle and ComponentTextStyle.

Example

{
  "componentTextStyles": {
    "exampleStyle": {

      "unorderedListItems": {
        "type": "character",
        "character": "✓"
      }
    }
  }
}

See Also

Text Styles