Guides and Sample Code

Developer

Apple News Format Reference

On This Page

Pull Quote

A pullquote is usually an excerpt from the body text. It generally duplicates that text in a format that increases its visibility. Pull quotes are often used to break up long portions of text or to draw attention to the body text near the pull quote.

Required Properties

Property and type

Description

Version

role

String

This component always has the role pullquote.

1.0

text

String

The text, styled according to the textStyle definition.

To separate text into paragraphs, use 2 new lines between the end of one paragraph and the beginning of the next paragraph. In JSON, new lines are encoded as \n. For example: Last line of paragraph 1\n\nFirst line of paragraph 2.

You can also use a subset of HTML tags or Markdown syntax by setting format to html or markdown, respectively. Alternatively, you can style ranges of text individually using inlineTextStyles.

For example, when format is set to markdown, you can apply *emphasis (italics)* and **strong (bold)**, and you can add dividers, lists, and links. See HTML Markup for Apple News Format and Markdown for Apple News Format for details.

1.0

Optional Properties

These optional properties are inherited from other component types; see those definitions for more information.

Property and type

Description

Version

additions

Array

An array of Additions that describe additional information about ranges of the caption text in the text property.

  • Additions are ignored when format is set to html or markdown.

1.1

anchor

Anchor

An anchor object that aligns this component with another component.

1.0

animation

Component Animation

A component animation object that applies an animation effect, such as a Fade-In Animation, to this component.

1.0

behavior

Behavior

A behavior object that applies a motion effect or other physics effect, such as Parallax or Springy.

1.0

format

String

The formatting or markup method applied to the text. Valid values:

  • html

  • markdown

  • none (default)

If format is set to html or markdown, neither additions nor inlineTextStyles are supported.

1.0

identifier

String

A unique identifier for this component. If used, identifier must be unique across the entire document. An identifier is required if you want to anchor other components to this component. See Anchor.

1.0

inlineTextStyles

Array of Inline Text Style components

By providing an array of inline text style objects, you can apply different text styles to ranges of text. For each inline text style, you should supply a rangeStart, rangeLength, and either a text style or the identifier of a text style that is defined at the top level of the document. See Text Style.

  • Inline text styles are ignored when format is set to html or markdown.

1.0

layout

Component Layout or String

Either an inline component layout object that contains layout information, or a string reference to a component layout that is defined at the top level of the document.

  • If layout is not defined, size and position will be based on various factors, such as the device type, the length of the content, and the role of this component.

1.0

style

Component Style or String

Either an inline component style object that defines the appearance of this component, or a string reference to a component style that is defined at the top level of the document.

1.0

textStyle

Component Text Style or String

Either an inline component text style object that contains styling information, or a string reference to a component text style object that is defined at the top level of the document in the componentTextStyles property.

1.0

Pull Quote Component Example

  1. {
  2. "role": "pullquote",
  3. "text": "It didn't feel like basketball; <span data-anf-textstyle=\"quoteColorStyle\">it felt like dancing</span>.",
  4. "format": "html"
  5. }