Markdown text= lays a document out from text: headings, lists, tasks, tables, quotes, coloured code, links and pictures. It is drawn again as the text changes, so an answer can arrive a few characters at a time.
What it lays out
CommonMark, with GitHub's tables, strikethrough, task lists, footnotes and bare addresses. Each card shows the source beside what it makes.
Markdown text=One prop. Styles written on it reach its column: font-size sets the scale.
Lists and tasksBullets, numbers, lists inside lists, and - [ ] / - [x] as checkboxes.
text
- Bullets
- With a nested list
- one deeper
- and its neighbour
- Back out
4. Ordered, starting at 4
5. Numbered on from there
1. nested too
- [x] Write the parser
- [x] Lay it out
- [ ] Add footnotes
Headings, quotes, rules# to ######, each with an id made from its words; a quote, and one inside it; a thematic break.
text
# Heading 1
## Heading 2
### Heading 3
#### Heading 4
##### Heading 5
###### Heading 6
A paragraph is text until a blank line.
> A quote, with **inline** marks.
>
> > And one inside it.
---
After the rule.
CodeA fenced block is coloured by Highlight in the language the fence names, and scrolls sideways.
Tables:-- left, :-: centre, --: right. Cells take inline marks; a wide table scrolls in its own frame.
Footnotes[^name] in the text, [^name]: its words anywhere. They are listed at the end, each with a link back for every place that points at it.
text
Footnotes are numbered in the order the text points at them[^order], whatever they are called[^name], and each has a way back[^order].
[^name]: This one is called `name` in the source.
[^order]: The first one mentioned, so it is 1.
Links, pictures, and what is refusedLinks inline, by reference, in angle brackets and bare. A link goes only to http, https, mailto, tel or a place in the app. Tags in the text are text.
text

A picture never spills out of its column. Links: [inline](https://example.com "With a title"), [by reference][card], [mail](mailto:ada@example.com), <https://example.com/auto>, and bare: www.example.com.
[card]: https://example.com/card "A reference link"
An address a page should not open is dropped and the words stay: [a javascript: link](javascript:alert(1)).
Raw HTML is shown, never run: <b onclick="alert(1)">bold?</b>
Live
Edit and previewThe editor element on the left writes the state the document on the right reads.
StreamingA timer hands over a few more characters at a time, as a model would. streaming= says the text is still arriving: a fence that has not closed yet is code so far, an unclosed mark is closed, a link shows before its address has come.
Speed
waiting
0 of 1270 characters
The answer will appear here.
The parts
Markdown is three smaller components over syntax.parse(text, "markdown"). They are the kit's inner parts, and a page can use them itself: each takes one node of the tree.
MdBlock, MdList, MdInlineThe tree's top-level nodes, one MdBlock each with its kind beside it; then only the lists, with MdList; then one paragraph's children as a single line, with MdInline.