• Mentions a resource, optionally one of its documents. text is the label shown in the editor and is what plainText reads. Like every other run helper it returns a run array holding one MentionRun, so it nests anywhere text goes.

    Parameters

    • target: {
          documentId?: string;
          resourceId: string;
          text?: string;
      }
      • OptionaldocumentId?: string
      • resourceId: string
      • Optionaltext?: string

    Returns Run[]

    const line = p('Ruled by ', mention({ resourceId: 'res_456', text: 'Princess Bubblegum' }))