Class Passage

A single passage in a story. This does not have a fromTwee() method because loading Twee may have story-wide effects.

Hierarchy

  • Passage

Constructors

Properties

Methods

Constructors

Properties

attributes: Record<string, unknown>

Attributes on the passage, like name or tags. These appear on the <tw-passagedata> element when published.

source: string

Source text of the passage.

Methods

  • Returns an HTML fragment for this passage, optionally setting the passage id (or pid) manually.

    Parameters

    • Optional pid: number

      PID to set in the published HTML

    Returns string

  • Creates an instance from an HTML fragment.

    Parameters

    • source: string

      source HTML to use

    • silent: boolean = false

      If true, doesn't issue any console warnings about potential problems

    Returns Passage

Generated using TypeDoc