function
convertMarkdownToLexical
A document from Markdown, such as a language model's answer or imported content, made the way the editor's Markdown shortcuts make it. It runs without a browser, so a server action or script can save it, and the editor can open it.
Arguments
| Argument | Type | Description |
|---|---|---|
markdown | string | The Markdown. Markdown for a feature the field doesn't have stays text. |
options | RichTextMarkdownOptions | The Go field's features, which default to all of the editor's. |
Returns
The declared result.
RichTextDocument<never>Full signature
function convertMarkdownToLexical(
markdown: string,
options?: RichTextMarkdownOptions,
): RichTextDocumentSource packages/plugin-richtext/src/lib/markdown/index.ts:52
Related types
RichTextMarkdownOptionsHow
convertMarkdownToLexicalconverts: which of the editor's features it may use.