convertMarkdownToRichText
function convertMarkdownToRichText(text: string, theme: Theme = {}): RichTextRun[];
Bold, italic, code and links are recognised and become runs carrying the style each one implies, ready to be written into a slide or a cell. A theme can change what those styles are — the font of a code run, say — without touching the text.
Parameters
Parameter | Type | Description |
|---|---|---|
|
| The Markdown to convert. |
|
| The styles each kind of run is given. |
Returns
RichTextRun[] — the runs, in order, each with its text and its style.
Throws
Exception | Condition |
|---|---|
| no argument is passed. |
| the text is not a string. An empty string is accepted and gives an empty array. |
Examples
In use
const runs = convertMarkdownToRichText("**bold** and `code`");
See also
Source
23 September 2026
This documentation was generated with AI (Claude) from the library's source code.