convertRichTextToMarkdown
The inverse of convertMarkdownToRichText: bold, italic and strikethrough become their markers again, a run carrying a link becomes [text](url), and a run set in the theme's code font becomes a code span.
A code run carries no flag of its own — it is recognised by its font — so pass the same theme both ways and the pair round-trips. Runs are written one after another in the order given, without merging neighbours that share a style, so deeply nested formatting may come back expressed differently while reading the same.
Parameters
Parameter | Type | Description |
|---|---|---|
|
| The runs to convert. An empty array gives an empty string. |
|
| The theme the runs were styled with. Only the code font is read from it. |
Returns
string — the Markdown representing the runs.
Throws
Exception | Condition |
|---|---|
| no argument is passed, the value is not an array, or an element is not a run with text. |
Examples
Back to Markdown
A link keeps its text styled
See also
Source
This documentation was generated with AI (Claude) from the library's source code.