Skip to main content

Build Markdown text components

đź“ť Note: If the AppDirect logo appears in the upper-left corner of the page, when Manage > Marketplace appears in this topic, click the grid icon > Switch to | Store, instead.

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

  • Text with Markdown markup language syntax.
  • Tokens that are valid for the component that contains the markdownText component. For more information, see Tokens.
  • {{Seller}} details token—Seller details, which appear in the Payable To section of web (non-PDF) invoices. You configure and format this content with Markdown markup language at Manage > Marketplace > Settings > Billing Settings | Invoice settings. There is a cheat sheet for basic Markdown syntax available on that page.
  • {{Memo}} token—Memo content that appears in the footer of web (non-PDF) invoices. You configure and format it with Markdown markup language at Manage > Marketplace > Settings > Billing Settings | Invoice settings. There is a cheat sheet for basic Markdown syntax available on that page.
  • Text with Markdown syntax and the {{Seller}} details token, {{Memo}} token, or both.

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.

Prerequisites​

You can add Markdown text components to cell components. For more information, see Build cell components.

Default template JSON sample​

In the Appdirect Template_EN_US default template, see the following:

  • {{Seller}} token example—Lines 355-365.
  • Data with Markdown markup language syntax to format it—Lines 691-702.

To download the default template

  1. Go to Manage > Marketplace > Settings > Invoice templates > Appdirect Template_EN_US | Gear icon | Download JSON.

Text component JSON schema​

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

Elements to populate text components​

ElementTypeDescription
markdownTextobjectDefines styles, behaviors, and content for Markdown text components.
typestringRequired. Defines the component type as Markdown text.
Valid value: markdownText
propertiesobjectRequired. Define
visiblebooleanRequired. Defines whether component appears on invoices.
Valid values: true | false
styleobjectRequired. 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"
datastringRequired. 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. For more information, 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}}*.

Was this page helpful?