The Markdown module for smidr.widgets.UITextArea: converts between the UITextStyle style model and Markdown, for import/export. toMarkdown flattens headings, bullet/numbered lists and bold/italic/underline runs; parse reads them back. It is a pair of pure functions over (text, styles) so it stays independent of the editor widget.

Static methods

staticparse(md:String):UIRichDoc

Parses Markdown (headings, lists, bold/italic/underline) into a styled document.

statictoMarkdown(text:String, styles:Array<Int>):String

Flattens styled content (text + its styles words) to Markdown.