Login
Free Sign Up
Docs
/

Text - Parse Markdown to Content

Type identifier: text:parseMarkdownToContent Category: Text Operations

Description

Parses Markdown text into rich content. Converts Markdown elements into structured content nodes. Handles code blocks, including automatic stripping of Markdown code fences if wrapping the entire content.

Input Handles

Handle

Data Type

Required

Description

markdown

string

No

Markdown string (if dynamic)

Input Handle Details

markdown

  • Type: string
  • Notes:

    • Accepts raw Markdown text
    • Automatically strips wrapping code fences

Output Handles

Handle

Data Type

Description

content

Content

Parsed rich content

Output Handle Details

content

  • Type: Content
  • Notes:

    • Includes paragraphs, headings, code blocks, and lists
    • Preserves formatting and structure

Configuration Options

Property

Type

Required

Default

Description

label

string

Yes

"Text Parse Markdown to Content"

Display label

markdown

string (literal or dynamic)

Yes

{ type: "dynamic" }

Markdown source

Configuration Details

markdown

  • Type: string, literal or dynamic
  • Variants:

    • { type: "dynamic" }: Use markdown input handle
    • { type: "literal", value: "..." }: Use static Markdown text
  • Notes: Allows embedding Markdown directly or sourcing dynamically

Behaviour

Execution Flow

  1. Resolves Markdown source (literal or dynamic)
  2. Strips wrapping code fences if present
  3. Parses Markdown to content
  4. Returns structured content

Code Fence Stripping

If the entire content is wrapped in markdown code fences:

```markdown
# Content here
```

The fences are automatically stripped before parsing.

Markdown Conversion

Markdown Element

Content Node Type

# Heading

heading level 1-6

Paragraph

paragraph

- List item

list + list-item

1. List item

numbered-list + list-item

[Link](https://example.com)

link

![Image](https://example.com/image.png)

image

`code`

Code text

```

code-block

> Quote

blockquote

**bold**

Bold text

*italic*

Italic text

Error Handling

Scenario

Behaviour

Parse failure

Throws error

Link with a non-http(s) scheme (for example, javascript:)

Throws error

Invalid Markdown

Best-effort parsing

Examples

Dynamic Markdown Input

{
  "type": "text:parseMarkdownToContent",
  "data": {
    "label": "Parse AI Response",
    "markdown": { "type": "dynamic" }
  }
}

Connect the Markdown string to the markdown input handle.

Static Markdown

{
  "type": "text:parseMarkdownToContent",
  "data": {
    "label": "Parse Static Content",
    "markdown": {
      "type": "literal",
      "value": "# Welcome\n\nThis is **bold** and *italic* text."
    }
  }
}

Parse LLM Response

{
  "type": "text:parseMarkdownToContent",
  "data": {
    "label": "Format LLM Output",
    "markdown": { "type": "dynamic" }
  }
}

Connect the LLM response to the markdown input handle to parse formatted output.

Related pages