Build Markdown text components

Markdown text components display text that you format with Markdown markup syntax. You can add the following to Markdown components:

When you use the seller and memo tokens, you avoid building the 'Payable To' information twice, on the Invoice settings page and in the PDF template.

Markdown text components are elementary components so they cannot contain components.

Note: You can create more than one active version of an invoice template per locale, and use conditional expressions to determine which fields appear on a version of an invoice template. You can only use conditional expressions in templates that you create or that you copy from a marketplace-provided default template. You cannot add conditional expressions to marketplace default templates. For more information, see Build Markdown text components.

Prerequisites

You can add Markdown text components to cell components. See Build cell components.

Default template JSON sample

In the Appdirect Template_EN_US default template, see the following:

To download the default template, go to .

Text component JSON schema

{
    "type": "markdownText",
    "style": { },
    "properties": {
        "visible": <true | false>
    },
    "data": "<text using standard Markdown syntax>"
}

Elements to populate text components

Element     Type Description

markdownText

    object Defines styles, behaviors, and content for Markdown text components.
 

type 

  string

Required. Defines the component type as Markdown text.

Valid value:

markdownText
 

properties

  object Required. Define
    visible boolean

Required.

Defines whether component appears on invoices.

Valid values:

true | false
  style   object

Required. Defines additional formatting for the Markdown-formatted text.

Valid values: HTML element names and CSS styles for the named HTML element.

All HTML styles. Only relevant styles that the Invoice Builder can render appear in the user interface preview and the PDF.

Example:

"color": "#333"
  data   string

Required. Markdown-formatted text or tokens, or both.

Token format:

{{Token Name}}

Valid values:

All text formatted with Markdown markup language. All tokens from a token category that is valid for the component that contains the Markdown text component. For example, invoice lines table component or footer. See Tokens.

Examples, where two asterisks in Markdown syntax renders the text bold and one asterisk renders it italicized:

**Please pay by the due date.**
*Contact us: 1(888) 444-3333*
**Due date:** {{Invoice Due Date}}
Please pay by *{{Invoice Due Date}}*.