Markdown to Lexical
AI-generatedOverview
This node transforms Markdown content into a JSON format compatible with Lexical, a rich text editor framework. It is useful for scenarios where users need to convert Markdown text into a structured JSON representation for further processing or integration with Lexical-based applications. For example, it can be used to prepare Markdown content for display or editing within a Lexical editor environment.
Use Case Examples
- Converting blog post content written in Markdown into Lexical JSON for a web editor.
- Transforming user-generated Markdown notes into a JSON format for storage and later editing in a Lexical editor.
Properties
| Name | Meaning |
|---|---|
| Markdown | Markdown content to transform to JSON for Lexical |
Output
JSON
lexicalJson- The JSON string output representing the transformed Markdown content compatible with Lexical
Dependencies
- An external utility function 'markdownToLexical' is used to perform the Markdown to Lexical JSON transformation.
Troubleshooting
- If the Markdown input is empty, the output 'lexicalJson' will be an empty string.
- Errors during transformation will either cause the node to fail or, if 'continueOnFail' is enabled, will output an error object alongside the original data for the failed item.
- Common errors may relate to invalid Markdown syntax or issues within the transformation utility function.