Ligantic
Knowledge Base
Tutorials
Updates
Search Articles
Login
Free Sign Up
Home
Get Started
Tutorials
How-to guides
Reference
Explanation
Spaces
Schemas
Flows
Experiences
Endpoints
SDK and CLI
Browse documentation
Home
Get Started
Spaces
Schemas
Flows
Experiences
Endpoints
SDK and CLI
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

When dynamic

Markdown string (if dynamic)

Input Handle Details

markdown

  • Type: string
  • Notes:

    • Accepts raw Markdown text
    • Automatically strips wrapping code fences
    • Must be a string; empty Markdown is accepted

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

Parsing failures publish no content value. This node has no error output handle.

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

Text - Content to Text
Converts rich content to serialised output. By default it serialises to plain text, and it can optionally serialise to HTML. Any included media is converted to pre-signed URLs for access.
Page not found. It may have moved or may not be published.
Browse documentation