Overview
This node converts Markdown text into Lexical format, a rich text editor data structure. It is useful when you want to transform Markdown content into a structured format that can be used by applications or editors supporting Lexical. For example, you might use this node to prepare Markdown input for a web-based rich text editor or to standardize content storage in a database.
Properties
| Name | Meaning |
|---|---|
| Markdown | The Markdown text to convert. Supports multiline input. |
Output
The node outputs the original input data with an additional field lexical added inside the json property. This lexical field contains the converted Lexical representation of the provided Markdown string.
Example output JSON structure:
{
"json": {
"...originalFields": "...",
"lexical": { /* Lexical formatted content */ }
}
}
No binary data output is produced by this node.
Dependencies
- Requires the utility function
convertMarkdownToLexicalfrom an internal utility module to perform the conversion. - No external API keys or services are needed.
- Runs entirely within n8n environment.
Troubleshooting
- Empty or invalid Markdown input: If the Markdown input is empty or malformed, the conversion may fail or produce unexpected results. Ensure valid Markdown syntax.
- Error handling: If an error occurs during conversion, and "Continue On Fail" is disabled, the node will throw an error indicating the item index causing the failure. Enable "Continue On Fail" to process remaining items despite errors.
- Large inputs: Very large Markdown inputs might impact performance or cause timeouts depending on the environment.
Links and References
- Markdown Guide
- Lexical Editor Documentation (for understanding the output format)