Skip to content

Markdown in Press

Flows support markdown content with the type="markdown" attribute. Press automatically strips leading indentation.

Usage

xml
<flows>
  <body type="markdown">
    # Heading

    Paragraph text with **bold** and *italic*.
  </body>
</flows>

Supported Features

FeatureSyntaxSupported
Heading 1# textYes
Heading 2## textYes
Heading 3### textYes
Heading 4#### textYes
Heading 5##### textYes
Heading 6###### textYes
Bold**text** or __text__Yes
Italic*text* or _text_Yes
Bold italic***text***Yes
Strikethrough~~text~~Yes
Ordered list1. itemYes
Unordered list- item or * itemYes
Nested listsIndented list itemsYes
Links[text](url)Yes
Images![alt](url)Yes
Inline code`code`Yes
Blockquotes> textYes
Horizontal rules--- or ***Yes
TablesGFM pipe table syntaxYes
Press elements<frame>, <table>, etc.Yes

Mixing Markdown and Press

Embed Press XML directly within markdown flows for advanced layout:

xml
<flows>
  <body type="markdown">
    # Report Summary

    The project achieved all key milestones.

    <frame direction="row" space-before-desired="12pt" space-after-desired="12pt">
      <frame width="fill" background-color="#f0fdf4" padding="12pt">
        <h3 font-color="#16a34a">Completed: 12</h3>
      </frame>
      <frame width="8pt" />
      <frame width="fill" background-color="#fef2f2" padding="12pt">
        <h3 font-color="#dc2626">Remaining: 3</h3>
      </frame>
    </frame>

    ## Next Steps

    Continue with phase two implementation.
  </body>
</flows>

Heading IDs

Markdown headings automatically receive a slug-based id derived from the heading text. This enables internal linking with target and cross-referencing with <ref /> and <page-number /> without manually setting id on each heading.

HeadingGenerated ID
# My Headingmy-heading
## Section 1section-1
# Hello World!hello-world

Slugs are lowercased, with spaces replaced by hyphens and special characters removed. Duplicate headings receive a numeric suffix (summary, summary-1, summary-2).

xml
<flows>
  <body type="markdown">
    # Introduction

    Some content here.

    # Methodology

    As described in the [introduction](#introduction)...
  </body>
</flows>

To reference a markdown heading from elsewhere in the document:

xml
<p>See page <page-number id="methodology" />.</p>
<frame target="introduction">Jump to Introduction</frame>

An explicit id attribute on a Press element always takes priority over the auto-generated slug.

Indentation

Press automatically removes consistent leading indentation from markdown content. This means you can indent markdown inside XML tags without affecting the output:

xml
<flows>
  <body type="markdown">
    # This heading works fine

    Despite being indented by 4 spaces in the source.
  </body>
</flows>

GFM Tables

GitHub-Flavored Markdown table syntax is supported:

markdown
| Column A | Column B | Column C |
| -------- | -------- | -------- |
| Value 1  | Value 2  | Value 3  |
| Value 4  | Value 5  | Value 6  |