Markdown icon

Markdown

输入和处理 Markdown 多行文本

Markdown

AI-generated

Summary

Process input Markdown text by optionally trimming whitespace and output it under a specified JSON field name, optionally merging with incoming data.

Inputs

  • markdownContent (required) — Multi-line Markdown text content to process.
  • outputFieldName — Name of the field in output JSON that stores the Markdown content; defaults to 'markdown'.
  • options.trim — Whether to trim leading and trailing whitespace from the Markdown content; defaults to true.
  • options.keepInputData — Whether to merge original input item JSON into the output; defaults to false.

Output shape

An array of JSON objects, one per input item, each containing at least the specified output field with the Markdown content. If 'keepInputData' is true, original input fields are retained and merged.

Errors for individual items produce JSON with an 'error' field if 'continueOnFail' is enabled; otherwise execution stops. The field containing Markdown content is customizable via 'outputFieldName'.

Examples

Example 1: Trim Markdown and output under default field without input merge

markdownContent=' # Heading \nitem ', outputFieldName='markdown', options: {trim: true, keepInputData: false} produces [{markdown: '# Heading\nitem'}].

Example 2: Keep input fields and store Markdown under 'content'

keepInputData=true, outputFieldName='content' results in output JSON combining original input fields plus a 'content' field with Markdown.

Links

Discussion